combine channels for meeting updates

This commit is contained in:
Zachary Chai
2016-11-07 11:19:54 -05:00
parent b8c876443f
commit 58d5e7e6c5
4 changed files with 18 additions and 12 deletions

View File

@ -2,15 +2,20 @@
var initRooms = function() {
App.messages = App.cable.subscriptions.create({
channel: 'ModeratorJoinsChannel',
channel: 'MeetingUpdatesChannel',
username: getRoomName()
},
{
received: function(data) {
if (!Meeting.getInstance().getModJoined()) {
Meeting.getInstance().setModJoined(true);
if (Meeting.getInstance().getWaitingForMod()) {
loopJoin();
if (data.action === 'moderator_joined') {
if (!Meeting.getInstance().getModJoined()) {
Meeting.getInstance().setModJoined(true);
if (Meeting.getInstance().getWaitingForMod()) {
loopJoin();
}
}
else if (data.action === 'meeting_ended') {
}
}
}