mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 04:04:20 +00:00 
			
		
		
		
	Update conversation members
This commit is contained in:
		@@ -555,7 +555,8 @@ const ConvChatWindow = {
 | 
			
		||||
			//We disable name field
 | 
			
		||||
			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.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){
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user