improvements

This commit is contained in:
tiago.kayaya
2021-09-09 11:47:49 +01:00
parent 9ff7a588d8
commit 129a709570
5 changed files with 86 additions and 9 deletions
@@ -29,6 +29,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
roomName:any;
members:any;
contacts: string[] = [" Ana M.", "Andre F.", "Bruno G.", "Catarina T", "Tiago"];
allUsers:any[] = [];
roomId: string;
loggedUserChat:any;
@@ -70,6 +71,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.scrollToBottom();
this.serverLongPull();
this.setStatus('online');
this.getChatMembers();
}
setStatus(status:string){
@@ -125,6 +127,16 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
});
}
async getChatMembers(){
//return await this.chatService.getMembers(roomId).toPromise();
this.chatService.getAllUsers().subscribe(res=> {
console.log(res);
this.allUsers = res['users'].filter(data => data.username != this.loggedUserChat.me.username);
console.log(this.allUsers);
});
}
/* load(){
this.getGroupContacts();
this.loadGroupMessages();