mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-03 19:54:14 +00:00 
			
		
		
		
	Can get informations about a unique conversation
This commit is contained in:
		@@ -120,8 +120,36 @@ ComunicWeb.components.conversations.interface = {
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		//Else, perform an API request
 | 
			
		||||
		//TODO : implement ON NEXT DEVELOPMENT SESSION
 | 
			
		||||
		console.log("Please implement me !!!!!!");
 | 
			
		||||
		var apiURI = "conversations/getInfosOne";
 | 
			
		||||
		var params = {
 | 
			
		||||
			conversationID: conversationID,
 | 
			
		||||
		};
 | 
			
		||||
 | 
			
		||||
		//Perform the API request
 | 
			
		||||
		ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, function(result){
 | 
			
		||||
 | 
			
		||||
			//Check for errors
 | 
			
		||||
			if(result.error){
 | 
			
		||||
				
 | 
			
		||||
				//Log error
 | 
			
		||||
				ComunicWeb.debug.logMessage("Couldn't get informations about the conversation number "+conversationID+" !")
 | 
			
		||||
 | 
			
		||||
				//Perform next action now
 | 
			
		||||
				nextStep(result);
 | 
			
		||||
 | 
			
		||||
				return false;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			//Else it is a success
 | 
			
		||||
			//Cache the result
 | 
			
		||||
			ComunicWeb.components.conversations.interface.__conversationsList["conversation-"+conversationID] = result;
 | 
			
		||||
 | 
			
		||||
			//Perform next action
 | 
			
		||||
			nextStep(result);
 | 
			
		||||
 | 
			
		||||
			return true;
 | 
			
		||||
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
		//Success
 | 
			
		||||
		return true;
 | 
			
		||||
 
 | 
			
		||||
@@ -66,7 +66,7 @@ ComunicWeb.components.conversations.manager = {
 | 
			
		||||
 | 
			
		||||
		//Then, open any already active conversation
 | 
			
		||||
		var openedConversations = ComunicWeb.components.conversations.cachingOpened.getAll();
 | 
			
		||||
		console.log(openedConversations);
 | 
			
		||||
		
 | 
			
		||||
		//Process opened conversations
 | 
			
		||||
		for(i in openedConversations){
 | 
			
		||||
			if(i < openedConversations.length)
 | 
			
		||||
@@ -156,6 +156,7 @@ ComunicWeb.components.conversations.manager = {
 | 
			
		||||
			if(informations.error){
 | 
			
		||||
				//Display error notification
 | 
			
		||||
				ComunicWeb.common.notificationSystem.showNotification("Couldn't get informations about the conversation !", "danger");
 | 
			
		||||
				return false;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			//Change the name of the conversation
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user