diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index c672ee8b1..1dc553b59 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -763,13 +763,6 @@ define([ }; onlyoffice.onEvent = Util.mkEvent(); - // Messenger - var messenger = common.messenger = {}; - messenger.execCommand = function (data, cb) { - postMessage("CHAT_COMMAND", data, cb); - }; - messenger.onEvent = Util.mkEvent(); - // Cursor var cursor = common.cursor = {}; cursor.execCommand = function (data, cb) { @@ -1284,8 +1277,6 @@ define([ }, // OnlyOffice OO_EVENT: common.onlyoffice.onEvent.fire, - // Chat - CHAT_EVENT: common.messenger.onEvent.fire, // Cursor CURSOR_EVENT: common.cursor.onEvent.fire, // Mailbox @@ -1439,7 +1430,6 @@ define([ anonHash: LocalStore.getFSHash(), localToken: tryParsing(localStorage.getItem(Constants.tokenKey)), // TODO move this to LocalStore ? language: common.getLanguage(), - messenger: rdyCfg.messenger, // Boolean driveEvents: rdyCfg.driveEvents // Boolean }; // if a pad is created from a file diff --git a/www/common/messenger-ui.js b/www/common/messenger-ui.js index 202e25cec..eb9c33bb0 100644 --- a/www/common/messenger-ui.js +++ b/www/common/messenger-ui.js @@ -623,7 +623,6 @@ define([ var channel = obj.id; var chan = state.channels[channel]; var data = obj.info; - // XXX Teams: if someone leaves a room, don't remove their data if they're also a friend if (contactsData[data.curvePublic] && !(chan && chan.isFriendChat)) { delete contactsData[data.curvePublic]; } diff --git a/www/common/outer/messenger.js b/www/common/outer/messenger.js index 2c951da6b..d19f3d809 100644 --- a/www/common/outer/messenger.js +++ b/www/common/outer/messenger.js @@ -112,8 +112,7 @@ define([ var network = ctx.store.network; network.sendto(network.historyKeeper, JSON.stringify(msg)).then(function () { }, function (err) { - // XXX throw? - throw new Error(err); + console.error(err); }); }; diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index a4a452521..134534eff 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -134,7 +134,6 @@ define([ }); } }), { - messenger: cfg.messaging, driveEvents: cfg.driveEvents }); })); @@ -1102,14 +1101,6 @@ define([ } }, cb); }); - /* DEPRECATED - sframeChan.on('Q_CHAT_COMMAND', function (data, cb) { - Cryptpad.messenger.execCommand(data, cb); - }); - Cryptpad.messenger.onEvent.reg(function (data) { - sframeChan.event('EV_CHAT_EVENT', data); - }); - */ } // Chrome 68 on Mac contains a bug resulting in the page turning white after a few seconds