({
socketId,
userIdsToNotify,
messageId,
parentMessageId,
chatId,
}: {
socketId?: string;
userIdsToNotify: string[];
messageId: string;
parentMessageId: string;
chatId: string;
})
| 527 | } |
| 528 | |
| 529 | function 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 | |
| 557 | function onlineStatus({ |
| 558 | socketId, |
no test coverage detected