Can query the server to refresh only a single conversation.

This commit is contained in:
Pierre 2018-05-14 17:23:33 +02:00
parent 92c7c80fbc
commit 7a473d1aa8

View File

@ -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
*