From f40abe400aebf4bf604a1c6f8924aba1a96497ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Wed, 14 Feb 2018 14:59:17 +0100 Subject: [FIX] mail: check not broken @ mention in discuss Rev. on this commit: https://github.com/odoo/odoo/commit/02ec09cb1c3e2d7bc7968f40c18f2208d7f3f498 A consequence of the above commit is that @ mention were broken: the dropup menu with partner propositions was not displaying when the user typed the first characters to mention a user (e.g. by typing "[at]demo" in order to show the proposed mention "[at]Demo User" in a dropup menu). This commit fixes the issue by reverting the logic of how mentions are provided by the chat_manager, while removing some dead code. note: [at] = @ --- addons/mail/static/src/js/services/chat_manager.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'addons/mail/static/src') diff --git a/addons/mail/static/src/js/services/chat_manager.js b/addons/mail/static/src/js/services/chat_manager.js index fb4b6672bc6..2655a07b55b 100644 --- a/addons/mail/static/src/js/services/chat_manager.js +++ b/addons/mail/static/src/js/services/chat_manager.js @@ -352,7 +352,6 @@ var ChatManager = AbstractService.extend({ * => list containing a list of members (cached by chat_manager) */ getMentionPartnerSuggestions: function (channel) { - var self = this; if (!channel) { return this.mentionPartnerSuggestions; } @@ -365,14 +364,7 @@ var ChatManager = AbstractService.extend({ shadow: true }) .then(function (members) { - var suggestions = []; - _.each(self.mentionPartnerSuggestions, function (partners) { - suggestions.push(_.filter(partners, function (partner) { - return !_.findWhere(members, { id: partner.id }); - })); - }); - - return [suggestions]; + return [members]; }); } return channel.membersDeferred; -- cgit v1.2.3