mirror of
https://github.com/hexastack/hexabot
synced 2025-02-24 05:14:47 +00:00
fix: synchronized sended messages for the same accounts
This commit is contained in:
parent
acf3663bd5
commit
9c884af233
@ -253,6 +253,11 @@ export class ChatService {
|
|||||||
// Already existing user profile
|
// Already existing user profile
|
||||||
// Exec lastvisit hook
|
// Exec lastvisit hook
|
||||||
this.eventEmitter.emit('hook:user:lastvisit', subscriber);
|
this.eventEmitter.emit('hook:user:lastvisit', subscriber);
|
||||||
|
this.websocketGateway.broadcast(
|
||||||
|
subscriber,
|
||||||
|
event.getEventType(),
|
||||||
|
event._adapter.raw,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.websocketGateway.broadcastSubscriberUpdate(subscriber);
|
this.websocketGateway.broadcastSubscriberUpdate(subscriber);
|
||||||
|
@ -250,7 +250,7 @@ const ChatProvider: React.FC<{
|
|||||||
}
|
}
|
||||||
|
|
||||||
setMessages((prevMessages) => [
|
setMessages((prevMessages) => [
|
||||||
...prevMessages,
|
...prevMessages.filter((message) => message.mid !== newIOMessage.mid),
|
||||||
newIOMessage as TMessage,
|
newIOMessage as TMessage,
|
||||||
]);
|
]);
|
||||||
setScroll(0);
|
setScroll(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user