ComunicWeb/assets/js/components/calls/utils.js

27 lines
554 B
JavaScript
Raw Normal View History

2019-01-26 14:49:08 +00:00
/**
* Calls utilities
*
* @author Pierre HUBERT
*/
ComunicWeb.components.calls.utils = {
/**
* Check out whether all the members of a conversation stop to follow it,
* except the current user
*
* @param {Object} info Information about the conversation to analyze
*/
hasEveryoneLeft: function(info){
var allDisconnected = true;
info.members.forEach(function(member){
if(member.status != "rejected" && member.status != "hang_up" && member.userID != userID())
allDisconnected = false;
});
return allDisconnected;
}
};