From 87f49b0616d67ea00e4e15db81459ed33310abec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Tue, 9 Jun 2020 10:58:52 +0000 Subject: [REM] im_support: remove im_support module The goal of the module was to communicate with livechat operators on our production server, except the feature is disabled on our prod and we don't plan to reactivate it any time soon. closes odoo/odoo#52691 Related: odoo/upgrade#1313 Signed-off-by: Christophe Simonis --- addons/im_support/static/src/js/support_message.js | 66 ---------------------- 1 file changed, 66 deletions(-) delete mode 100644 addons/im_support/static/src/js/support_message.js (limited to 'addons/im_support/static/src/js/support_message.js') diff --git a/addons/im_support/static/src/js/support_message.js b/addons/im_support/static/src/js/support_message.js deleted file mode 100644 index 92c85842aad..00000000000 --- a/addons/im_support/static/src/js/support_message.js +++ /dev/null @@ -1,66 +0,0 @@ -odoo.define('im_support.SupportMessage', function (require) { -"use strict"; - -var Message = require('mail.model.Message'); - -var session = require('web.session'); - -/** - * This is a model for messages that are in the the support channel - */ -var SupportMessage = Message.extend({ - /** - * @override - */ - init: function () { - this._super.apply(this, arguments); - if ( - !this._serverAuthorID || - this._serverAuthorID[0] !== this.call('mail_service', 'getOdoobotID')[0] - ) { - if (!this._serverAuthorID[0]) { - // the author is the client - this._serverAuthorID = [session.partner_id, session.name]; - } else { - // the author is the operator - // prevent from conflicting with partners of this instance - this._serverAuthorID[0] = -1; - } - } - }, - - //-------------------------------------------------------------------------- - // Public - //-------------------------------------------------------------------------- - - /** - * @override - * @returns {string} - */ - getAvatarSource: function () { - return '/mail/static/src/img/odoo_o.png'; - }, - /** - * Overrides to prevent clicks on the Support operator from redirecting. - * - * @override - * @returns {boolean} - */ - shouldRedirectToAuthor: function () { - return false; - }, - /** - * Overrides to prevent from calling the server for messages of the Support - * channel (which are records on the Support database). - * - * @override - * @returns {Promise} - */ - toggleStarStatus: function () { - return Promise.resolve(); - }, -}); - -return SupportMessage; - -}); -- cgit v1.2.3