This commit is contained in:
Peter Maquiran
2022-09-29 14:51:50 +01:00
parent 68d8753abd
commit 50a7290edf
3 changed files with 6 additions and 6 deletions
+1
View File
@@ -147,6 +147,7 @@ export class ChatPage implements OnInit {
if (event instanceof NavigationEnd && event.url == '/home/chat' || if (event instanceof NavigationEnd && event.url == '/home/chat' ||
event instanceof NavigationEnd && event.url == "/home/chat?gbCreateGroup=true") { event instanceof NavigationEnd && event.url == "/home/chat?gbCreateGroup=true") {
this.chatService.refreshtoken();
this.checkCreateGroup(); this.checkCreateGroup();
} }
@@ -18,8 +18,6 @@ export class ContactsPage implements OnInit {
loggedUser: any; loggedUser: any;
users = []; users = [];
headers: HttpHeaders;
options:any;
contacts:any; contacts:any;
textSearch:string; textSearch:string;
room:any; room:any;
@@ -52,9 +50,7 @@ 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);
@@ -68,6 +64,8 @@ export class ContactsPage implements OnInit {
return 0; return 0;
}); });
this.showLoader = false; this.showLoader = false;
}, (error) =>{
this.chatService.refreshtoken();
}); });
} }
+1
View File
@@ -133,6 +133,7 @@ export class LoginPage implements OnInit {
await this.authService.loginToChatWs(); await this.authService.loginToChatWs();
this.ChatService.setheader() this.ChatService.setheader()
this.ChatService.refreshtoken();
} }