diff --git a/addons/mail/static/src/core/web/thread_service_patch.js b/addons/mail/static/src/core/web/thread_service_patch.js index fcd59ac561c..87ef909ed45 100644 --- a/addons/mail/static/src/core/web/thread_service_patch.js +++ b/addons/mail/static/src/core/web/thread_service_patch.js @@ -107,7 +107,7 @@ patch(ThreadService.prototype, { if (id === false) { thread.messages.push({ id: this.messageService.getNextTemporaryId(), - author: { id: this.store.self.id }, + author: this.store.self, body: _t("Creating a new record..."), message_type: "notification", trackingValues: [], diff --git a/addons/mail/static/tests/web/chatter_tests.js b/addons/mail/static/tests/web/chatter_tests.js index bd63318fb28..38f45123ee7 100644 --- a/addons/mail/static/tests/web/chatter_tests.js +++ b/addons/mail/static/tests/web/chatter_tests.js @@ -312,6 +312,7 @@ QUnit.test("base rendering when chatter has no record", async () => { await contains(".o-mail-AttachmentBox", { count: 0 }); await contains(".o-mail-Chatter .o-mail-Thread"); await contains(".o-mail-Message"); + await contains(".o-mail-Message-author", { text: "Mitchell Admin" }); await contains(".o-mail-Message-body", { text: "Creating a new record..." }); await contains("button", { count: 0, text: "Load More" }); await contains(".o-mail-Message-actions");