Can respond to group invitations.

This commit is contained in:
Pierre HUBERT
2018-07-05 13:37:56 +02:00
parent 66392491b5
commit 561a3e9342
5 changed files with 140 additions and 36 deletions

View File

@ -112,4 +112,22 @@ ComunicWeb.components.groups.interface = {
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
},
/**
* Respond to a group invitation
*
* @param {Number} id The ID of the target group
* @param {Boolean} accept Specify whether the invitation was
* accepted or not
* @param {Function} callback
*/
respondInvitation: function(id, accept, callback) {
//Perform the request over the API
var apiURI = "groups/respond_invitation";
var params = {
id: id,
accept: accept
};
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
},
};