|
@@ -17,7 +17,7 @@ export class RoomService {
|
|
|
private readonly actionsService: ActionsService,
|
|
|
private readonly delayService: DelayService,
|
|
|
private readonly tempService: TempService,
|
|
|
- ) {}
|
|
|
+ ) { }
|
|
|
public readonly logger = new Logger('user');
|
|
|
public _sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));
|
|
|
public _userInfo = {} as UserInfoType;
|
|
@@ -61,6 +61,7 @@ export class RoomService {
|
|
|
if (socket.data?.user) {
|
|
|
this.delayService.handleOffline(socket);
|
|
|
const { RoomId, UserId, Role } = socket.data.user;
|
|
|
+ await this.userService.setRoomEntranceLog(RoomId, UserId, 1);
|
|
|
if (RoomId && UserId) {
|
|
|
//标记主动退出房间
|
|
|
if (socket.data.isRequestExit !== 1 && socket.data.isKick !== 1) {
|
|
@@ -108,6 +109,7 @@ export class RoomService {
|
|
|
await this.delayService.handleOnine(socket);
|
|
|
let blockJoin = false;
|
|
|
const { RoomId, UserId, Role, roomConfig } = socket.data.user;
|
|
|
+ await this.userService.setRoomEntranceLog(RoomId, UserId, 0);
|
|
|
const _isLeader = Role === 'leader';
|
|
|
if (RoomId?.length && UserId?.length) {
|
|
|
//房主设置房间配置
|