mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 05:49:22 +00:00
Update conversation members
This commit is contained in:
parent
1f35b02326
commit
9bb9ff6153
@ -555,7 +555,8 @@ const ConvChatWindow = {
|
|||||||
//We disable name field
|
//We disable name field
|
||||||
settingsForm.conversationNameInput.disabled = "true";
|
settingsForm.conversationNameInput.disabled = "true";
|
||||||
|
|
||||||
//We hide conversation users (presents in members pane)
|
//We hide conversation users (presents in members pane - if user is not allowed to add new members)
|
||||||
|
if(!conversation.infos.canEveryoneAddMembers)
|
||||||
settingsForm.usersElement.parentNode.style.display = "none";
|
settingsForm.usersElement.parentNode.style.display = "none";
|
||||||
|
|
||||||
settingsForm.allowEveryoneToAddMembers.parentNode.parentNode.remove();
|
settingsForm.allowEveryoneToAddMembers.parentNode.parentNode.remove();
|
||||||
@ -616,14 +617,17 @@ const ConvChatWindow = {
|
|||||||
following: conversation.settingsForm.followConversationInput.checked,
|
following: conversation.settingsForm.followConversationInput.checked,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Get conversation members
|
||||||
|
if(conversation.infos.ID_owner == userID() || conversation.infos.canEveryoneAddMembers)
|
||||||
|
newValues.members = ComunicWeb.components.userSelect.getResults(conversation.settingsForm.usersElement);
|
||||||
|
|
||||||
//Add other fields if the user is a conversation moderator
|
//Add other fields if the user is a conversation moderator
|
||||||
if(conversation.infos.ID_owner == userID()){
|
if(conversation.infos.ID_owner == userID()){
|
||||||
//Specify conversation name
|
//Specify conversation name
|
||||||
var nameValue = conversation.settingsForm.conversationNameInput.value
|
var nameValue = conversation.settingsForm.conversationNameInput.value
|
||||||
newValues.name = (nameValue === "" ? false : nameValue);
|
newValues.name = (nameValue === "" ? false : nameValue);
|
||||||
|
|
||||||
//Get conversation members
|
|
||||||
newValues.members = ComunicWeb.components.userSelect.getResults(conversation.settingsForm.usersElement);
|
|
||||||
|
|
||||||
//Check if any users were selected
|
//Check if any users were selected
|
||||||
if(newValues.members.length === 0){
|
if(newValues.members.length === 0){
|
||||||
|
Loading…
Reference in New Issue
Block a user