mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-24 09:58:51 +00:00
Update conversation members
This commit is contained in:
parent
1f35b02326
commit
9bb9ff6153
@ -555,8 +555,9 @@ const ConvChatWindow = {
|
||||
//We disable name field
|
||||
settingsForm.conversationNameInput.disabled = "true";
|
||||
|
||||
//We hide conversation users (presents in members pane)
|
||||
settingsForm.usersElement.parentNode.style.display = "none";
|
||||
//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.allowEveryoneToAddMembers.parentNode.parentNode.remove();
|
||||
}
|
||||
@ -616,14 +617,17 @@ const ConvChatWindow = {
|
||||
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
|
||||
if(conversation.infos.ID_owner == userID()){
|
||||
//Specify conversation name
|
||||
var nameValue = conversation.settingsForm.conversationNameInput.value
|
||||
newValues.name = (nameValue === "" ? false : nameValue);
|
||||
|
||||
//Get conversation members
|
||||
newValues.members = ComunicWeb.components.userSelect.getResults(conversation.settingsForm.usersElement);
|
||||
|
||||
|
||||
//Check if any users were selected
|
||||
if(newValues.members.length === 0){
|
||||
|
Loading…
Reference in New Issue
Block a user