mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-25 06:49:23 +00:00
Update method
This commit is contained in:
parent
73f97b626f
commit
5d9067d3a7
@ -150,16 +150,11 @@ export class UserWebSocketActions {
|
|||||||
* @param c New comment
|
* @param c New comment
|
||||||
*/
|
*/
|
||||||
public static async CreatedNewComment(c: Comment) {
|
public static async CreatedNewComment(c: Comment) {
|
||||||
|
await UserWebSocketController.SendToSpecifcClients(
|
||||||
for(const client of UserWebSocketController.active_clients.filter((e) => e.registeredPosts.has(c.postID))) {
|
(e) => e.registeredPosts.has(c.postID),
|
||||||
|
async (client) => WsMessage.NoIDMessage("new_comment",
|
||||||
UserWebSocketController.SendToClient(client, new WsMessage({
|
await CommentsController.CommentToAPI(new AbritraryUserConnection(client.userID), c, true))
|
||||||
id: "",
|
)
|
||||||
title: "new_comment",
|
|
||||||
data: await CommentsController.CommentToAPI(new AbritraryUserConnection(client.userID), c, true)
|
|
||||||
}))
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user