mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-12-27 14:08:53 +00:00
Notify of comment update
This commit is contained in:
parent
b636f9c14e
commit
25f25815f5
@ -163,7 +163,13 @@ export class UserWebSocketActions {
|
||||
public static async UpdatedComment(commentID: number) {
|
||||
const comment = await CommentsHelper.GetSingle(commentID);
|
||||
|
||||
console.info(comment)
|
||||
for(const client of UserWebSocketController.active_clients.filter((e) => e.registeredPosts.has(comment.postID))) {
|
||||
UserWebSocketController.SendToClient(client, new WsMessage({
|
||||
id: "",
|
||||
title: "comment_updated",
|
||||
data: await CommentsController.CommentToAPI(new AbritraryUserConnection(client.userID), comment, true)
|
||||
}))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user