diff options
| author | Sébastien Theys <seb@odoo.com> | 2020-12-10 16:44:28 +0000 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2020-12-10 16:44:28 +0000 |
| commit | e5c3d63375bf314f6748fd3f8b95eba313b154ac (patch) | |
| tree | 27e717a52933e0842ef1c95e3b677dd7ea834ed0 | |
| parent | d2150c212c607aec1f0679aea1a4a84971dcf377 (diff) | |
[FIX] mail: prevent autofollow when using mentions in notes
task-2415579
closes odoo/odoo#63196
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
| -rw-r--r-- | addons/mail/static/src/models/composer/composer.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/addons/mail/static/src/models/composer/composer.js b/addons/mail/static/src/models/composer/composer.js index 39444e3b0d5..13c4dac04a0 100644 --- a/addons/mail/static/src/models/composer/composer.js +++ b/addons/mail/static/src/models/composer/composer.js @@ -291,9 +291,6 @@ function factory(dependencies) { attachment_ids: this.attachments.map(attachment => attachment.id), body, channel_ids: this.mentionedChannels.map(channel => channel.id), - context: { - mail_post_autofollow: true, - }, message_type: 'comment', partner_ids: this.recipients.map(partner => partner.id), }; @@ -327,6 +324,11 @@ function factory(dependencies) { Object.assign(postData, { subtype_xmlid: this.isLog ? 'mail.mt_note' : 'mail.mt_comment', }); + if (!this.isLog) { + postData.context = { + mail_post_autofollow: true, + }; + } messageId = await this.async(() => this.env.models['mail.thread'].performRpcMessagePost({ postData, |
