|
@@ -17,12 +17,11 @@ export class RoomService {
|
|
private readonly actionsService: ActionsService,
|
|
private readonly actionsService: ActionsService,
|
|
private readonly delayService: DelayService,
|
|
private readonly delayService: DelayService,
|
|
private readonly tempService: TempService,
|
|
private readonly tempService: TempService,
|
|
- ) { }
|
|
|
|
|
|
+ ) {}
|
|
public readonly logger = new Logger('user');
|
|
public readonly logger = new Logger('user');
|
|
public _sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));
|
|
public _sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));
|
|
public _userInfo = {} as UserInfoType;
|
|
public _userInfo = {} as UserInfoType;
|
|
- private _roomConfig = {} as RoomConfigType;
|
|
|
|
- private isJoin = false;
|
|
|
|
|
|
+
|
|
private get _roomId(): string {
|
|
private get _roomId(): string {
|
|
return this._userInfo.RoomId;
|
|
return this._userInfo.RoomId;
|
|
}
|
|
}
|
|
@@ -113,7 +112,6 @@ export class RoomService {
|
|
const { RoomId, UserId, Role } = socket.data.user;
|
|
const { RoomId, UserId, Role } = socket.data.user;
|
|
|
|
|
|
if (RoomId?.length && UserId?.length) {
|
|
if (RoomId?.length && UserId?.length) {
|
|
-
|
|
|
|
//房主设置房间配置
|
|
//房主设置房间配置
|
|
if (this._isLeader) {
|
|
if (this._isLeader) {
|
|
const isValid = await this.userService.isRoomMaster(RoomId, UserId);
|
|
const isValid = await this.userService.isRoomMaster(RoomId, UserId);
|
|
@@ -178,7 +176,7 @@ export class RoomService {
|
|
members: roomUsers,
|
|
members: roomUsers,
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- this.isJoin = true;
|
|
|
|
|
|
+ // this.isJoin = true;
|
|
this.logger.log(
|
|
this.logger.log(
|
|
JSON.stringify(socket.data.user),
|
|
JSON.stringify(socket.data.user),
|
|
`join-user-${socket.data.user.Role}`,
|
|
`join-user-${socket.data.user.Role}`,
|