|
@@ -12,7 +12,7 @@ export class ActionsService {
|
|
private roomService: RoomService,
|
|
private roomService: RoomService,
|
|
@Inject(forwardRef(() => UsersService))
|
|
@Inject(forwardRef(() => UsersService))
|
|
private userService: UsersService,
|
|
private userService: UsersService,
|
|
- ) {}
|
|
|
|
|
|
+ ) { }
|
|
|
|
|
|
async handleAllAction(socket: Socket, data: ActionsParams): Promise<void> {
|
|
async handleAllAction(socket: Socket, data: ActionsParams): Promise<void> {
|
|
const isSocketLeader = () => {
|
|
const isSocketLeader = () => {
|
|
@@ -30,10 +30,13 @@ export class ActionsService {
|
|
case 'users-muted':
|
|
case 'users-muted':
|
|
const mutedParams = data as any as MutedStateType;
|
|
const mutedParams = data as any as MutedStateType;
|
|
isSocketLeader() && (await this.handleMutedState(mutedParams));
|
|
isSocketLeader() && (await this.handleMutedState(mutedParams));
|
|
|
|
+ await this.roomService.handleRoomStatusAction(socket);
|
|
break;
|
|
break;
|
|
case 'users-words':
|
|
case 'users-words':
|
|
const typingParams = data as any as TypingStateType;
|
|
const typingParams = data as any as TypingStateType;
|
|
isSocketLeader() && (await this.handleTypingState(typingParams));
|
|
isSocketLeader() && (await this.handleTypingState(typingParams));
|
|
|
|
+ this.roomService.handleRoomStatusAction(socket);
|
|
|
|
+ await this.roomService.handleRoomStatusAction(socket);
|
|
break;
|
|
break;
|
|
case 'users-kicked':
|
|
case 'users-kicked':
|
|
const kickParams = data as any as KickStateType;
|
|
const kickParams = data as any as KickStateType;
|