diff --git a/src/controllers/UserWebSocketActions.ts b/src/controllers/UserWebSocketActions.ts index a806e7a..5a3d2e4 100644 --- a/src/controllers/UserWebSocketActions.ts +++ b/src/controllers/UserWebSocketActions.ts @@ -143,7 +143,18 @@ export class UserWebSocketActions { * @param msgID Message ID */ public static async UpdatedConversationMessage(msgID: number) { - console.info("Update conversation message " + msgID); + 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) + })) + + } } /** diff --git a/src/helpers/ConversationsHelper.ts b/src/helpers/ConversationsHelper.ts index 7740b47..c0f5b93 100644 --- a/src/helpers/ConversationsHelper.ts +++ b/src/helpers/ConversationsHelper.ts @@ -317,7 +317,7 @@ export class ConversationsHelper { * @param messageID The ID of the message to get * @throws If the message was not found */ - private static async GetSingleMessage(messageID: number) : Promise { + public static async GetSingleMessage(messageID: number) : Promise { const row = await DatabaseHelper.QueryRow({ table: MESSAGES_TABLE, where: {