fix errors

This commit is contained in:
Peter Maquiran
2023-08-14 21:26:23 +01:00
parent 0c64632986
commit 3dae0db03e
9 changed files with 39 additions and 12 deletions
@@ -81,16 +81,27 @@ export class ContactsPage implements OnInit {
}
clicked() {}
loading = false
createRoom(username:string) {
if(this.loading) {
return
}
this.loading = true
let body = {
username: username,
}
this.chatService.createRoom(body).subscribe(async(res) => {
this.room = res['room'];
this.ChatSystemService.getAllRooms();
await this.ChatSystemService.getAllRooms();
this.getDirectMessage(this.room._id);
this.loading = false
}, ()=> {
this.loading = false
});
}
getDirectMessage(roomId:any) {