Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kyeahxx19 committed Nov 19, 2023
2 parents 828e795 + df8777a commit 42150fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/chat/chat.gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ export class ChatGateway
@MessageBody() roomId: string,
) {
this.chatService.leaveChatRoom(client.data.userId, roomId);
client.leave(roomId);
this.server
await this.server
.to(roomId)
.emit('leave_room', { roomId: roomId, userId: client.data.userId });
this.server
await this.server
.to(`${roomId}_list`)
.emit('leave_room', { roomId: roomId, userId: client.data.userId });
client.leave(roomId);
}
}

0 comments on commit 42150fe

Please sign in to comment.