join and change room bug fixed
This commit is contained in:
@@ -25,6 +25,18 @@ export class ChatService {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
private format_room(room: Chatroom)
|
||||
{
|
||||
let new_room: roomDto = {
|
||||
name: room.name,
|
||||
type: room.type,
|
||||
owner: room.owner,
|
||||
users: room.users,
|
||||
};
|
||||
|
||||
return new_room;
|
||||
}
|
||||
|
||||
|
||||
/* GETTERS ************************************************
|
||||
*/
|
||||
@@ -222,7 +234,7 @@ export class ChatService {
|
||||
this.chatroomRepository.save(room);
|
||||
|
||||
console.log("-- out addUserToRoom service");
|
||||
return room;
|
||||
return this.format_room(room);
|
||||
}
|
||||
|
||||
async addMessageToRoom(room_name: string, username: string, message: string): Promise<void>
|
||||
|
||||
Reference in New Issue
Block a user