ComunicWeb/assets/js/components/calls/controller.js

30 lines
548 B
JavaScript
Raw Normal View History

2020-04-10 09:24:46 +00:00
/**
* Calls controller
*
* @author Pierre Hubert
*/
2020-04-10 11:18:26 +00:00
/**
* @type {Map<number, CallWindow>}
*/
let OpenConversations = new Map();
2020-04-10 09:24:46 +00:00
class CallsController {
/**
* Open a call for a conversation
*
* @param {Conversation} conv Information about the target conversation
*/
static Open(conv) {
2020-04-10 11:18:26 +00:00
if(OpenConversations.has(conv.ID))
return;
console.info("Open call for conversation " + conv.ID);
// Create a new window for the conversation
const window = new CallWindow(conv);
OpenConversations.set(conv.ID, window)
2020-04-10 09:24:46 +00:00
}
}