mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user