[FIX] mail: mark as read can ignore 404 error

404 means that the thread was deleted

Task-3577083

closes odoo/odoo#141372

X-original-commit: 6aeb00d7e3b60f9eb0cb968fe16ba1a333076ec3
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Didier Debondt (did) <did@odoo.com>
This commit is contained in:
Didier (did)
2023-11-08 01:21:58 +00:00
committed by Alexandre Kühn
parent b160005840
commit bcf64fa885
@@ -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);