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

Function unreadMessageDeleted

api/server/sockets.ts:529–555  ·  view source on GitHub ↗
({
  socketId,
  userIdsToNotify,
  messageId,
  parentMessageId,
  chatId,
}: {
  socketId?: string;
  userIdsToNotify: string[];
  messageId: string;
  parentMessageId: string;
  chatId: string;
})

Source from the content-addressed store, hash-verified

527}
528
529function unreadMessageDeleted({
530 socketId,
531 userIdsToNotify,
532 messageId,
533 parentMessageId,
534 chatId,
535}: {
536 socketId?: string;
537 userIdsToNotify: string[];
538 messageId: string;
539 parentMessageId: string;
540 chatId: string;
541}) {
542 const socket = getSocket(socketId);
543 if (socket) {
544 userIdsToNotify.forEach((userId) => {
545 const roomName = `user-${userId}`;
546 socket.to(roomName).emit('unreadByUserMessageEvent', {
547 actionType: 'deleted',
548 messageId,
549 userId,
550 parentMessageId,
551 chatId,
552 });
553 });
554 }
555}
556
557function onlineStatus({
558 socketId,

Callers 1

team-member.tsFile · 0.90

Calls 1

getSocketFunction · 0.85

Tested by

no test coverage detected