Merge pull request #404 from Hexastack/392-issue-multiple-access-dont-returning-message-sent-from-other-users
Some checks are pending
Build and Push Docker Images / paths-filter (push) Waiting to run
Build and Push Docker Images / build-and-push (push) Blocked by required conditions

fix: synchronized sended messages for the same accounts
This commit is contained in:
Med Marrouchi 2024-12-06 08:18:51 +01:00 committed by GitHub
commit 10a4d6a22c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -253,6 +253,11 @@ export class ChatService {
// Already existing user profile
// Exec lastvisit hook
this.eventEmitter.emit('hook:user:lastvisit', subscriber);
this.websocketGateway.broadcast(
subscriber,
event.getEventType(),
event._adapter.raw,
);
}
this.websocketGateway.broadcastSubscriberUpdate(subscriber);

View File

@ -250,7 +250,7 @@ const ChatProvider: React.FC<{
}
setMessages((prevMessages) => [
...prevMessages,
...prevMessages.filter((message) => message.mid !== newIOMessage.mid),
newIOMessage as TMessage,
]);
setScroll(0);