This commit is contained in:
Peter Maquiran
2022-09-30 11:19:30 +01:00
parent 020f9c1bfc
commit 34f9537954
2 changed files with 11 additions and 7 deletions
@@ -403,7 +403,11 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
}
async getRoomInfo() {
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory({});
if(this.wsChatMethodsService.getGroupRoom(this.roomId)) {
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory({});
}
let room = await this.chatService.getRoomInfo(this.roomId).toPromise();
// console.log('ROOM',room)
this.room = room['room'];
@@ -527,12 +527,12 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
getChatMembers() {
//
//this.showLoader = true;
// this.chatService.getMembers(this.roomId).subscribe(res => {
// this.members = res['members'];
// this.dmUsers = res['members'].filter(data => data.username != this.sessionStore.user.UserName)
// this.showLoader = false;
// });
this.showLoader = true;
this.chatService.getMembers(this.roomId).subscribe(res => {
this.members = res['members'];
this.dmUsers = res['members'].filter(data => data.username != this.sessionStore.user.UserName)
this.showLoader = false;
});
}
async openMessagesOptions(ev: any) {