diff options
| author | Alexandre Kühn <aku@odoo.com> | 2018-02-14 14:59:17 +0100 |
|---|---|---|
| committer | Alexandre Kühn <aku@odoo.com> | 2018-02-20 13:32:57 +0100 |
| commit | f40abe400aebf4bf604a1c6f8924aba1a96497ac (patch) | |
| tree | e0ba328244af3b5cb5a49274ea24fecd82f5b697 /addons/mail/static/src/js/services/chat_manager.js | |
| parent | 22f04b4023038e72fe74ff6d19c7ea4068c532cb (diff) | |
[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] = @
Diffstat (limited to 'addons/mail/static/src/js/services/chat_manager.js')
| -rw-r--r-- | addons/mail/static/src/js/services/chat_manager.js | 10 |
1 files changed, 1 insertions, 9 deletions
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; |
