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

Function onlineStatus

api/server/sockets.ts:557–580  ·  view source on GitHub ↗
({
  socketId,
  status,
  teamId,
  userId,
}: {
  socketId?: string;
  status: boolean;
  teamId: string;
  userId: string;
})

Source from the content-addressed store, hash-verified

555}
556
557function onlineStatus({
558 socketId,
559 status,
560 teamId,
561 userId,
562}: {
563 socketId?: string;
564 status: boolean;
565 teamId: string;
566 userId: string;
567}) {
568 const socket = getSocket(socketId);
569
570 const roomName = `team-${teamId}`;
571
572 if (socket) {
573 socket.to(roomName).emit('onlineStatusEvent', {
574 actionType: 'edited',
575 status,
576 userId,
577 teamId,
578 });
579 }
580}
581
582function typingStatus({
583 socketId,

Callers 2

team-member.tsFile · 0.90
setupSocketsFunction · 0.85

Calls 1

getSocketFunction · 0.85

Tested by

no test coverage detected