mute ok
This commit is contained in:
@@ -471,7 +471,6 @@ export class ChatController {
|
||||
let server = this.chatGateway.server;
|
||||
await this.chatService.addMessageToRoom(room_name, "SERVER", message);
|
||||
await server.in(socket.room).emit('message', "SERVER", message);
|
||||
//await server.to(socket.id).emit('muted');
|
||||
|
||||
const room = await this.chatService.getRoomByName(room_name);
|
||||
|
||||
@@ -516,6 +515,12 @@ export class ChatController {
|
||||
|
||||
await this.chatService.removeMute(username, room_name);
|
||||
|
||||
let message = `${req.user.username} has un-muted ${username}`;
|
||||
let socket: socketDto = this.chatGateway.sockets.get(req.user.username);
|
||||
let server = this.chatGateway.server;
|
||||
await this.chatService.addMessageToRoom(room_name, "SERVER", message);
|
||||
await server.in(socket.room).emit('message', "SERVER", message);
|
||||
|
||||
res.status(HttpStatus.OK).json({ message: "successfull unmute" });
|
||||
printCaller("- out ");
|
||||
}
|
||||
|
||||
@@ -7,7 +7,8 @@ export class muteDto
|
||||
name: string;
|
||||
|
||||
@IsDate()
|
||||
date: Date;
|
||||
@IsOptional()
|
||||
date?: Date;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user