mirror of
https://github.com/hexastack/hexabot
synced 2025-04-01 08:15:07 +00:00
fix: update broadcast method
This commit is contained in:
parent
93a59ae96d
commit
0d64ca33f3
@ -47,7 +47,12 @@ export class ChatService {
|
||||
private readonly attachmentService: AttachmentService,
|
||||
) {}
|
||||
|
||||
broadcastSendedMessages(event: EventWrapper<any, any>) {
|
||||
/**
|
||||
* Synchronize sent messages cross opened websocket connections of the same account
|
||||
*
|
||||
* @param event - The received event
|
||||
*/
|
||||
private broadcastSentMessages(event: EventWrapper<any, any>) {
|
||||
this.websocketGateway.broadcast(
|
||||
event.getSender(),
|
||||
event.getEventType(),
|
||||
@ -276,7 +281,7 @@ export class ChatService {
|
||||
// Already existing user profile
|
||||
// Exec lastvisit hook
|
||||
this.eventEmitter.emit('hook:user:lastvisit', subscriber);
|
||||
this.broadcastSendedMessages(event);
|
||||
this.broadcastSentMessages(event);
|
||||
}
|
||||
|
||||
this.websocketGateway.broadcastSubscriberUpdate(subscriber);
|
||||
|
Loading…
Reference in New Issue
Block a user