MCPcopy Create free account
hub / github.com/async-labs/async / commentAdded

Function commentAdded

api/server/sockets.ts:217–224  ·  view source on GitHub ↗
({ socketId, comment }: { socketId?: string; comment: ICommentDocument })

Source from the content-addressed store, hash-verified

215}
216
217function commentAdded({ socketId, comment }: { socketId?: string; comment: ICommentDocument }) {
218 const roomName = `discussion-${comment.discussionId}`;
219
220 const socket = getSocket(socketId);
221 if (socket) {
222 socket.to(roomName).emit('commentEvent', { actionType: 'added', comment });
223 }
224}
225
226function commentEdited({ socketId, comment }: { socketId?: string; comment: ICommentDocument }) {
227 const roomName = `discussion-${comment.discussionId}`;

Callers 1

team-member.tsFile · 0.90

Calls 1

getSocketFunction · 0.85

Tested by

no test coverage detected