diff options
| author | Sébastien Theys <seb@odoo.com> | 2020-11-24 10:56:26 +0000 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2020-11-24 10:56:26 +0000 |
| commit | 0a3fe0a513abbde8f74d59de522a216035cdcd98 (patch) | |
| tree | 3b46dd88f817ed6b78f3b668145271cc938c5cf6 /addons/mail/static/src/models | |
| parent | 967a2ab323e273c853aee0edd5ce404f4d14e6ab (diff) | |
[FIX] mail: avoid adding non-members on mention in channels
task-2392010
closes odoo/odoo#62230
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/src/models')
| -rw-r--r-- | addons/mail/static/src/models/composer/composer.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/mail/static/src/models/composer/composer.js b/addons/mail/static/src/models/composer/composer.js index 8bedfa4e3d7..2e087a1bb72 100644 --- a/addons/mail/static/src/models/composer/composer.js +++ b/addons/mail/static/src/models/composer/composer.js @@ -188,6 +188,10 @@ function factory(dependencies) { * @returns {mail.partner[]} */ _computeRecipients() { + if (this.thread && this.thread.model === 'mail.channel') { + // prevent from notifying/adding to followers non-members + return [['unlink-all']]; + } const recipients = [...this.mentionedPartners]; if (this.thread && !this.isLog) { for (const recipient of this.thread.suggestedRecipientInfoList) { |
