1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-11-24 22:39:21 +00:00

Update method

This commit is contained in:
Pierre HUBERT 2020-04-02 19:03:31 +02:00
parent 5d9067d3a7
commit cda807ae65

View File

@ -165,13 +165,11 @@ export class UserWebSocketActions {
public static async UpdatedComment(commentID: number) { public static async UpdatedComment(commentID: number) {
const comment = await CommentsHelper.GetSingle(commentID); const comment = await CommentsHelper.GetSingle(commentID);
for(const client of UserWebSocketController.active_clients.filter((e) => e.registeredPosts.has(comment.postID))) { await UserWebSocketController.SendToSpecifcClients(
UserWebSocketController.SendToClient(client, new WsMessage({ (e) => e.registeredPosts.has(comment.postID),
id: "", async (client) => WsMessage.NoIDMessage("comment_updated",
title: "comment_updated", await CommentsController.CommentToAPI(new AbritraryUserConnection(client.userID), comment))
data: await CommentsController.CommentToAPI(new AbritraryUserConnection(client.userID), comment) )
}))
}
} }
/** /**