From bcf64fa88530e220afc02dd9e11519df212f4189 Mon Sep 17 00:00:00 2001 From: "Didier (did)" Date: Mon, 6 Nov 2023 15:08:39 +0100 Subject: [PATCH] [FIX] mail: mark as read can ignore 404 error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 404 means that the thread was deleted Task-3577083 closes odoo/odoo#141372 X-original-commit: 6aeb00d7e3b60f9eb0cb968fe16ba1a333076ec3 Signed-off-by: Alexandre Kühn (aku) Signed-off-by: Didier Debondt (did) --- addons/mail/static/src/core/common/thread_service.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/mail/static/src/core/common/thread_service.js b/addons/mail/static/src/core/common/thread_service.js index fa5fdcd26ac..e91e6c77f00 100644 --- a/addons/mail/static/src/core/common/thread_service.js +++ b/addons/mail/static/src/core/common/thread_service.js @@ -100,6 +100,10 @@ export class ThreadService { last_message_id: newestPersistentMessage.id, }).then(() => { this.updateSeen(thread, newestPersistentMessage.id); + }).catch((e) => { + if (e.code !== 404) { + throw e; + } }); } else if (newestPersistentMessage) { this.updateSeen(thread);