This commit is contained in:
Peter Maquiran
2022-08-10 14:24:45 +01:00
parent 90296bf577
commit c50c2f866d
7 changed files with 21 additions and 33 deletions
@@ -42,10 +42,12 @@ export class ContactsPage implements OnInit {
this.room=null;
}
ngOnInit() {
async ngOnInit() {
this.loadUsers();
this.chatService.refreshtoken();
await this.chatService.refreshtoken();
this.loadUsers();
}
onChange(event){
@@ -68,11 +70,11 @@ export class ContactsPage implements OnInit {
}
}
loadUsers(){
loadUsers() {
this.options = {
headers: this.headers,
};
this.chatService.getAllUsers().subscribe((res:any)=>{
this.chatService.getAllUsers().subscribe((res:any)=> {
//this.contacts = res.users.filter(data => data.username != this.sessionStore.user.UserName);
this.contacts = res.users.filter(data => data.username != this.sessionStore.user.UserName);