FS-7889: [mod_conference] move conference chat to use an event channel so messages only go to the right 'room' for the conference

This commit is contained in:
Michael Jerris
2015-07-23 19:09:24 -05:00
parent c702eda6b2
commit 12a6b8bc53
7 changed files with 124 additions and 13 deletions

View File

@@ -1436,6 +1436,14 @@
//$(".jsDataTable").width(confMan.params.hasVid ? "900px" : "800px");
verto.subscribe(confMan.params.laData.chatChannel, {
handler: function(v, e) {
if (typeof(confMan.params.chatCallback) === "function") {
confMan.params.chatCallback(v,e);
}
}
});
if (confMan.params.laData.role === "moderator") {
atitle = "Action";
awidth = 600;
@@ -1588,7 +1596,18 @@
}
});
};
$.verto.confMan.prototype.sendChat = function(message, type) {
var confMan = this;
confMan.verto.rpcClient.call("verto.broadcast", {
"eventChannel": confMan.params.laData.chatChannel,
"data": {
"action": "send",
"message": message,
"type": type
}
});
};
$.verto.confMan.prototype.destroy = function() {
@@ -1600,6 +1619,10 @@
confMan.lt.destroy();
}
if (confMan.params.laData.chatChannel) {
confMan.verto.unsubscribe(confMan.params.laData.chatChannel);
}
if (confMan.params.laData.modChannel) {
confMan.verto.unsubscribe(confMan.params.laData.modChannel);
}