mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-03 19:54:14 +00:00 
			
		
		
		
	Can query the server to refresh only a single conversation.
This commit is contained in:
		@@ -343,6 +343,26 @@ ComunicWeb.components.conversations.interface = {
 | 
			
		||||
		ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Get the the lastest messages of a single conversation
 | 
			
		||||
	 * 
 | 
			
		||||
	 * @param {Number} convID Target conversation ID
 | 
			
		||||
	 * @param {Number} lastMessageID The ID of the last known message
 | 
			
		||||
	 * @param {function} callback
 | 
			
		||||
	 */
 | 
			
		||||
	refreshSingleConversation: function(convID, lastMessageID, callback){
 | 
			
		||||
 | 
			
		||||
		//Perform a request on the API
 | 
			
		||||
		var apiURI = "conversations/refresh_single";
 | 
			
		||||
		var params = {
 | 
			
		||||
			conversationID: convID,
 | 
			
		||||
			last_message_id: lastMessageID
 | 
			
		||||
		};
 | 
			
		||||
 | 
			
		||||
		ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
 | 
			
		||||
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Empty conversations cache
 | 
			
		||||
	 * 
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user