Show call button on conversation of two people when available

This commit is contained in:
2019-01-23 15:45:19 +01:00
parent feb17e3f13
commit cd4e6ddcb1
3 changed files with 74 additions and 10 deletions

View File

@ -42,6 +42,29 @@ ComunicWeb.components.calls.controller = {
});
});
},
/**
* Access calls configuration
*
* @return Cached calls configuration
*/
getConfig() {
return ComunicWeb.components.calls.__config;
},
/**
* Check if the call feature is available or not
*/
isAvailable: function(){
//If do not have any call configuration, it is not possible to
//make calls
if(this.getConfig() == null)
return false;
//Read configuration
return this.getConfig().enabled;
}
}