abord trying to live informe for new rooms

This commit is contained in:
simplonco
2023-01-15 14:07:34 +01:00
parent 804cab9c8d
commit ffdc3839b9
4 changed files with 6 additions and 2 deletions

View File

@@ -290,6 +290,7 @@ export class ChatController {
// inform other connected users
let socket: socketDto = this.chatGateway.sockets.get(req.user.username);
await socket.to(socket.room).emit('message', "SERVER", message);
await socket.to(socket.room).emit('new_password');
const ret_room = this.format_room(room);
res.status(HttpStatus.OK).json({ room: ret_room });

View File

@@ -35,6 +35,8 @@ export class ChatService {
{
printCaller("-- in ");
//await this.sleep(1000);
const queryBuilder = this.chatroomRepository
.createQueryBuilder('chatroom')
.where('chatroom.users LIKE :user_name', { user_name: `%${username}%` });