|
@@ -198,19 +198,19 @@ export class RoomAssistant {
|
|
|
await this.buildRoom(roomId, userId, user);
|
|
|
this.room.logger.error("不存在房间", roomId);
|
|
|
}
|
|
|
- if (!isJoinRoom) {
|
|
|
- this.room.logger.info("加入房间 :", { userId, roomId, user });
|
|
|
- this.socket.join(roomId);
|
|
|
- const AllRoomUsers = await getAllRoomUsers(roomId);
|
|
|
- const roomConfig = await getRoomConfig(roomId);
|
|
|
- this.socket.broadcast.to(roomId).emit(EVENT.roomIn, {
|
|
|
- user,
|
|
|
- roomsPerson: AllRoomUsers,
|
|
|
- roomsConfig: roomConfig,
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.room.logger.info(`已加入房间 :`, { userId });
|
|
|
- }
|
|
|
+ // if (!isJoinRoom) {
|
|
|
+ this.room.logger.info("加入房间 :", { userId, roomId, user });
|
|
|
+ this.socket.join(roomId);
|
|
|
+ const AllRoomUsers = await getAllRoomUsers(roomId);
|
|
|
+ const roomConfig = await getRoomConfig(roomId);
|
|
|
+ this.socket.broadcast.to(roomId).emit(EVENT.roomIn, {
|
|
|
+ user,
|
|
|
+ roomsPerson: AllRoomUsers,
|
|
|
+ roomsConfig: roomConfig,
|
|
|
+ });
|
|
|
+ // } else {
|
|
|
+ // this.room.logger.info(`已加入房间 :`, { userId });
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
/**
|