Merge pull request #1528 from thecodingmachine/api_chat_multiple_virtual_users
When there are many virtual users (generated by chat), only the name of a first user is displayed.
This commit is contained in:
commit
b6d571500e
4 changed files with 12 additions and 10 deletions
|
@ -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({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue