|
|
@ -1058,14 +1058,16 @@ define([
|
|
|
|
onConnect: function (wc, sendMessage) {
|
|
|
|
onConnect: function (wc, sendMessage) {
|
|
|
|
channel.sendMessage = function (msg, cId, cb) {
|
|
|
|
channel.sendMessage = function (msg, cId, cb) {
|
|
|
|
// Send to server
|
|
|
|
// Send to server
|
|
|
|
sendMessage(msg, cb);
|
|
|
|
sendMessage(msg, function () {
|
|
|
|
// Broadcast to other tabs
|
|
|
|
// Broadcast to other tabs
|
|
|
|
channel.pushHistory(CpNfWorker.removeCp(msg), /^cp\|/.test(msg));
|
|
|
|
channel.pushHistory(CpNfWorker.removeCp(msg), /^cp\|/.test(msg));
|
|
|
|
channel.bcast("PAD_MESSAGE", {
|
|
|
|
channel.bcast("PAD_MESSAGE", {
|
|
|
|
user: wc.myID,
|
|
|
|
user: wc.myID,
|
|
|
|
msg: CpNfWorker.removeCp(msg),
|
|
|
|
msg: CpNfWorker.removeCp(msg),
|
|
|
|
validateKey: channel.data.validateKey
|
|
|
|
validateKey: channel.data.validateKey
|
|
|
|
}, cId);
|
|
|
|
}, cId);
|
|
|
|
|
|
|
|
cb();
|
|
|
|
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
channel.wc = wc;
|
|
|
|
channel.wc = wc;
|
|
|
|
channel.queue.forEach(function (data) {
|
|
|
|
channel.queue.forEach(function (data) {
|
|
|
|