Remove old call system

This commit is contained in:
2020-04-10 11:17:10 +02:00
parent 8dc337a00c
commit c8d0fc3186
15 changed files with 8 additions and 2116 deletions

View File

@ -25,28 +25,23 @@ ComunicWeb.components.notifications.interface = {
/**
* Get the number of unread news such as notifications or conversations
*
* @param {boolean} get_calls Get the number of pending calls
* @param {function} callback
*/
getAllUnread: function(get_calls, callback){
getAllUnread: function(callback){
//Perform API request
var apiURI = "notifications/count_all_news";
var params = {};
//Check if we have to get the number of pending calls
if(get_calls)
params.include_calls = true;
//Perform the request
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
},
// ASync version of previous request
asyncGetAllUnread: async function(getCalls) {
asyncGetAllUnread: async function() {
return await new Promise((res, err) => {
this.getAllUnread(getCalls, (data) => {
this.getAllUnread((data) => {
if(data.error)
err(data.error);
else