summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/models/message
diff options
context:
space:
mode:
authorXavier Dubuc <xdu@odoo.com>2020-09-18 10:09:04 +0000
committerXavier Dubuc <xdu@odoo.com>2020-09-23 18:53:51 +0000
commit4f12598008eba2bb2e65016e12acf3edd5d83f8c (patch)
tree19377b572c6f506aab32ebfd948f222343f77783 /addons/mail/static/src/models/message
parent318135d38a743effbe7067ded4f3e6cb5b1d14e0 (diff)
[FIX] mail: use compute fields for identifying relations
(in message seen indicators) task-2335647 closes odoo/odoo#58373 X-original-commit: 3d4ff42f4474a5761c9e0737297d973992a2fcc2 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/mail/static/src/models/message')
-rw-r--r--addons/mail/static/src/models/message/message.js11
1 files changed, 3 insertions, 8 deletions
diff --git a/addons/mail/static/src/models/message/message.js b/addons/mail/static/src/models/message/message.js
index f375294666c..2c963632101 100644
--- a/addons/mail/static/src/models/message/message.js
+++ b/addons/mail/static/src/models/message/message.js
@@ -229,14 +229,9 @@ function factory(dependencies) {
// on `channel` channels for performance reasons
continue;
}
- thread.update({
- messageSeenIndicators: [[
- 'insert',
- {
- id: this.env.models['mail.message_seen_indicator'].computeId(message.id, thread.id),
- message: [['link', message]],
- },
- ]],
+ this.env.models['mail.message_seen_indicator'].insert({
+ messageId: message.id,
+ threadId: thread.id,
});
}
}