show already selected members of the group chat

- filter list of available members to group chat
This commit is contained in:
tiago.kayaya
2021-01-26 11:03:00 +01:00
parent c1494c70a7
commit 0ef5b6628a
8 changed files with 58 additions and 31 deletions
+10 -4
View File
@@ -22,9 +22,6 @@ export class LoginPage implements OnInit {
password: string = environment.defaultuserpwd;
userattempt: User;
public body = {"user": this.username,"password": this.password};
public postData = {"user": this.username,"password": this.password};
constructor(
private router: Router,
private authService: AuthService,
@@ -56,11 +53,18 @@ export class LoginPage implements OnInit {
}
loginRocketChat(){
this.authService.loginChat(this.postData).subscribe((res: any) =>{
let postData = {
"user": this.username,
"password": this.password
}
this.authService.loginChat(postData).subscribe((res: any) =>{
this.storageService.store(AuthConnstants.AUTH, res.data);
console.log('Logged user \n'+res.data);
console.log('Login to Rocket chat OK');
},(error:any) =>{
console.log('Network error');
this.presentAlert('Network error '+error);
});
}
@@ -78,6 +82,8 @@ export class LoginPage implements OnInit {
BasicAuthKey: ""
}
if (await this.authService.login(this.userattempt)){
console.log(this.userattempt);
this.loginRocketChat();
this.router.navigate(['/home/events']);
}