diff --git a/CHANGELOG.md b/CHANGELOG.md index 18f26012..ef120a3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Moving a discussion over a user will now add this user to the discussion - Being in a silent zone new forces mediaConstraints to false (#1508) - Fixes for the emote menu (#1501) +- Fixing chat message attributed to wrong user (#1507 #1528) ## Version 1.5.0 ### Updates diff --git a/front/src/Stores/ChatStore.ts b/front/src/Stores/ChatStore.ts index feb1f3ec..1bb763cf 100644 --- a/front/src/Stores/ChatStore.ts +++ b/front/src/Stores/ChatStore.ts @@ -84,7 +84,7 @@ function createChatMessagesStore() { addExternalMessage(authorId: number, text: string) { update((list) => { const lastMessage = list[list.length - 1]; - if (lastMessage && lastMessage.type === ChatMessageTypes.text && lastMessage.text) { + if (lastMessage && lastMessage.type === ChatMessageTypes.text && lastMessage.text && lastMessage?.author?.userId === authorId) { lastMessage.text.push(text); } else { list.push({