summaryrefslogtreecommitdiff
path: root/addons/mail/static/tests/document_thread_window_tests.js
diff options
context:
space:
mode:
authorAlexandre Kühn <aku@odoo.com>2019-05-23 11:00:53 +0000
committerNicolas Lempereur <nle@odoo.com>2019-08-09 09:21:19 +0000
commit9269e876fd62e51360d695342f0634dffdf6f87d (patch)
tree84e3b62423271222c34c1eed915a9aae5f23533f /addons/mail/static/tests/document_thread_window_tests.js
parentb515d54232b9fc53c0bc14f6ddbe70e4f16d3208 (diff)
[FIX] mail: notify other tabs on document thread message post
Before this commit, most new messages added to the mail manager were handled as if recently posted from a document thread. As a result, it was frequently setting a new item in the local storage to notify other tabs from these new messages. The intent of this behaviour is to notify other tabs of newly posted messages in a document thread, without using a longpolling notification. That means this logic should only apply on messages that have been recently posted on a document thread. Sometimes, this issue was breaking the local storage on Firefox. It showed the error message "Quota Exceeded Error" whenever `setItem` was used, even when items were removed beforehand. The capacity of the storage was only a few Kbs on this domain, far from reaching the maximum capacity. We think that this error comes from the concurrent `setItem` on multiple tabs, but this is very hard to reproduce. This commit fixes the issue by limiting the `setItem` to the tab that really posted the message. Tests have been adapted in order to pass only with this fix. note: backport of 12.2 4bde721f9 opw-2031960 closes #35588 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/tests/document_thread_window_tests.js')
-rw-r--r--addons/mail/static/tests/document_thread_window_tests.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/static/tests/document_thread_window_tests.js b/addons/mail/static/tests/document_thread_window_tests.js
index 084a7fb32a3..bdab46e91ef 100644
--- a/addons/mail/static/tests/document_thread_window_tests.js
+++ b/addons/mail/static/tests/document_thread_window_tests.js
@@ -48,7 +48,7 @@ QUnit.module('Document Thread', {
},
records: [{
id: 1,
- author_id: [1, 'Me'],
+ author_id: [partnerID, 'Me'],
body: '<p>Some Message on a document</p>',
channel_ids: [],
model: 'some.res.model',