|
@@ -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;
|
|
@@ -104,6 +104,10 @@ export class RoomService {
|
|
|
userInfo: UserInfoParams,
|
|
|
): Promise<void> {
|
|
|
const user = this.initUserProfile(userInfo);
|
|
|
+ const exist = await this.userService.getUsersBy(user.RoomId, user.UserId);
|
|
|
+ if ('IsAssistant' in exist) {
|
|
|
+ user.IsAssistant = exist.IsAssistant;
|
|
|
+ }
|
|
|
this._userInfo = user;
|
|
|
socket.data.user = user;
|
|
|
socket.data.user.roomConfig = userInfo.roomConfig;
|