diff options
| author | Sébastien Theys <seb@odoo.com> | 2020-09-28 16:55:09 +0000 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2020-09-29 11:18:29 +0000 |
| commit | 2d54b3eec1500dde43583ca1599ef12be4c7cad2 (patch) | |
| tree | 19056138fd5ecb8ac3815f7d6ca4caac26845a06 /addons/mail/static/src/models/thread | |
| parent | e2f3b3a4dcd74c4dd094160b65981cf07d518d4c (diff) | |
[FIX] mail: prevent sync fold state for non-channels
task-2346650
closes odoo/odoo#58794
X-original-commit: f5b6e78e77eac27af3b3812ac3818a67acaa1c85
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/src/models/thread')
| -rw-r--r-- | addons/mail/static/src/models/thread/thread.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/addons/mail/static/src/models/thread/thread.js b/addons/mail/static/src/models/thread/thread.js index bd40751ca59..4ad43577b1f 100644 --- a/addons/mail/static/src/models/thread/thread.js +++ b/addons/mail/static/src/models/thread/thread.js @@ -616,6 +616,13 @@ function factory(dependencies) { * @param {string} state */ async notifyFoldStateToServer(state) { + if (this.model !== 'mail.channel') { + // Server sync of fold state is only supported for channels. + return; + } + if (!this.uuid) { + return; + } return this.env.models['mail.thread'].performRpcChannelFold(this.uuid, state); } |
