build error fix

This commit is contained in:
Peter Maquiran
2022-10-12 11:38:04 +01:00
parent 9781e6801c
commit ec13a0cd8e
5 changed files with 41 additions and 35 deletions
@@ -83,7 +83,7 @@ export class ChatPopoverPage implements OnInit {
let body = { "roomId":this.roomId, }
let res:any = await this.ChatSystemService.leaveRoom(this.roomId);
this.ChatSystemService.deleteRoom(this.roomId)
if(res.error){
if(res.error.error = "error-you-are-last-owner"){
@@ -98,12 +98,11 @@ export class ChatPopoverPage implements OnInit {
this.toastService._badRequest("Não foi possível sair do grupo");
}
}
else{
else {
this.ChatSystemService.deleteRoom(this.roomId)
this.close('leave');
}
this.close('leave');
}
//Delete
@@ -112,12 +111,12 @@ export class ChatPopoverPage implements OnInit {
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
this.room = room['room'];
if(this.room.t === 'p'){
if(this.room.t === 'p') {
this.chatService.deleteGroup(body).subscribe(res=>{
this.ChatSystemService.deleteRoom(this.roomId)
});
}
else{
else {
this.chatService.deleteChannel(body).subscribe(res=>{
this.ChatSystemService.deleteRoom(this.roomId)
});