diff --git a/src/controllers/UserWebSocketActions.ts b/src/controllers/UserWebSocketActions.ts index c26b6bd..2bf5621 100644 --- a/src/controllers/UserWebSocketActions.ts +++ b/src/controllers/UserWebSocketActions.ts @@ -138,16 +138,10 @@ export class UserWebSocketActions { public static async UpdatedConversationMessage(msgID: number) { const msg = await ConversationsHelper.GetSingleMessage(msgID); - for(const client of UserWebSocketController.active_clients.filter( - e => e.registeredConversations.has(msg.convID))) { - - UserWebSocketController.SendToClient(client, new WsMessage({ - id: "", - title: "updated_conv_message", - data: ConversationsController.ConversationMessageToAPI(msg) - })) - - } + await UserWebSocketController.SendToSpecifcClients( + (e) => e.registeredConversations.has(msg.convID), + () => WsMessage.NoIDMessage("updated_conv_message", ConversationsController.ConversationMessageToAPI(msg)) + ) } /**