summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/services/mail_document_thread_manager.js
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2019-07-24 07:36:59 +0000
committerMartin Trigaux <mat@odoo.com>2019-07-24 10:32:23 +0000
commita98427834e00380e2e63e08668f5c2b069e3c2ea (patch)
treefbefd4a26124efbaf5e6b4bdbf58ec570014c896 /addons/mail/static/src/js/services/mail_document_thread_manager.js
parent4e6ee3ac97041653ff15a77abd77084dc0c9f525 (diff)
parent860ab5a1c28ba85d7a193d68cfbbb1063bbf0651 (diff)
[MERGE] Forward port of saas-12.2 to saas-12.3 up to 860ab5a1c28ba
closes odoo/odoo#35119 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Diffstat (limited to 'addons/mail/static/src/js/services/mail_document_thread_manager.js')
-rw-r--r--addons/mail/static/src/js/services/mail_document_thread_manager.js17
1 files changed, 5 insertions, 12 deletions
diff --git a/addons/mail/static/src/js/services/mail_document_thread_manager.js b/addons/mail/static/src/js/services/mail_document_thread_manager.js
index f1d9eefb44a..acf06461a04 100644
--- a/addons/mail/static/src/js/services/mail_document_thread_manager.js
+++ b/addons/mail/static/src/js/services/mail_document_thread_manager.js
@@ -48,23 +48,16 @@ MailManager.include({
*
* @override
* @param {Object} data
- * @param {Array} [data.author_id] [int, string] where int is server ID of
- * the author, and string is the name of the author.
* @param {integer} data.id server ID of the message
- * @param {string} [data.model] the model name of the document that this
- * message is related to.
- * @param {integer} [data.res_id] the ID of the document that this message
- * is related to.
- *
+ * @param {Object} [options]
+ * @param {boolean} [options.postedFromDocumentThread=false]
*/
- addMessage: function (data) {
+ addMessage: function (data, options) {
var message = this.getMessage(data.id);
if (
!message &&
- data.res_id &&
- data.model &&
- data.author_id &&
- data.author_id[0] === session.partner_id
+ options &&
+ options.postedFromDocumentThread
) {
var key = this.DOCUMENT_THREAD_MESSAGE_KEY;
this.call('local_storage', 'setItem', key, data);