mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-29 15:26:27 +00:00
Can get informations about a unique conversation
This commit is contained in:
parent
cfc1a3cda1
commit
87158e9982
@ -120,8 +120,36 @@ ComunicWeb.components.conversations.interface = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Else, perform an API request
|
//Else, perform an API request
|
||||||
//TODO : implement ON NEXT DEVELOPMENT SESSION
|
var apiURI = "conversations/getInfosOne";
|
||||||
console.log("Please implement me !!!!!!");
|
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
|
//Success
|
||||||
return true;
|
return true;
|
||||||
|
@ -66,7 +66,7 @@ ComunicWeb.components.conversations.manager = {
|
|||||||
|
|
||||||
//Then, open any already active conversation
|
//Then, open any already active conversation
|
||||||
var openedConversations = ComunicWeb.components.conversations.cachingOpened.getAll();
|
var openedConversations = ComunicWeb.components.conversations.cachingOpened.getAll();
|
||||||
console.log(openedConversations);
|
|
||||||
//Process opened conversations
|
//Process opened conversations
|
||||||
for(i in openedConversations){
|
for(i in openedConversations){
|
||||||
if(i < openedConversations.length)
|
if(i < openedConversations.length)
|
||||||
@ -156,6 +156,7 @@ ComunicWeb.components.conversations.manager = {
|
|||||||
if(informations.error){
|
if(informations.error){
|
||||||
//Display error notification
|
//Display error notification
|
||||||
ComunicWeb.common.notificationSystem.showNotification("Couldn't get informations about the conversation !", "danger");
|
ComunicWeb.common.notificationSystem.showNotification("Couldn't get informations about the conversation !", "danger");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Change the name of the conversation
|
//Change the name of the conversation
|
||||||
|
Loading…
Reference in New Issue
Block a user