mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
changes on Rocket Chat authentication
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
<div class="item-title-time">
|
||||
<div class="item-title">
|
||||
<ion-label *ngFor="let user of dm.usernames">
|
||||
<span *ngIf="user !=loggedUser.me.username">
|
||||
<span *ngIf="user !=loggedUserChat.me.username">
|
||||
{{user}}
|
||||
</span>
|
||||
</ion-label>
|
||||
|
||||
@@ -90,6 +90,8 @@ export class ChatPage implements OnInit {
|
||||
|
||||
|
||||
/* Fim websockets variables*/
|
||||
loggedUserChat:any;
|
||||
|
||||
constructor(
|
||||
private http:HttpClient,
|
||||
private chatService: ChatService,
|
||||
@@ -98,11 +100,14 @@ export class ChatPage implements OnInit {
|
||||
private storage:Storage,
|
||||
private resolver: ComponentFactoryResolver,
|
||||
){
|
||||
this.loggedUserChat = authService.ValidatedUserChat['data'];
|
||||
this.headers = new HttpHeaders();
|
||||
this.loadMessage();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.loggedUserChat);
|
||||
|
||||
this.segment = "Contactos";
|
||||
|
||||
this.authService.userData$.subscribe((res:any)=>{
|
||||
@@ -255,7 +260,7 @@ sendMsg() {
|
||||
}
|
||||
getChatMembers(){
|
||||
this.chatService.getMembers(this.userDirectMessages[0]._id).subscribe(res=> {
|
||||
this.dmUsers = res['members'].filter(data => data.username != this.loggedUser.me.username)
|
||||
this.dmUsers = res['members'].filter(data => data.username != this.loggedUserChat.me.username)
|
||||
});
|
||||
}
|
||||
getGroups(){
|
||||
|
||||
@@ -59,7 +59,6 @@ export class LoginPage implements OnInit {
|
||||
} else {
|
||||
this.userLoginPreference = ''
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
@@ -72,7 +71,6 @@ export class LoginPage implements OnInit {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
async presentAlert(message: string) {
|
||||
const alert = await this.alertController.create({
|
||||
cssClass: 'my-custom-class',
|
||||
@@ -84,7 +82,7 @@ export class LoginPage implements OnInit {
|
||||
await alert.present();
|
||||
}
|
||||
|
||||
loginRocketChat() {
|
||||
/* loginRocketChat() {
|
||||
|
||||
let postData = {
|
||||
"user": this.username,
|
||||
@@ -99,7 +97,7 @@ export class LoginPage implements OnInit {
|
||||
console.log('Network error');
|
||||
this.presentAlert('Network error ' + error);
|
||||
});
|
||||
}
|
||||
} */
|
||||
|
||||
getToken() {
|
||||
// this.notificatinsservice.getAndpostToken(this.username);
|
||||
@@ -115,7 +113,8 @@ export class LoginPage implements OnInit {
|
||||
BasicAuthKey: ""
|
||||
}
|
||||
if (await this.authService.login(this.userattempt)) {
|
||||
this.loginRocketChat();
|
||||
//this.loginRocketChat();
|
||||
this.authService.loginChat(this.userattempt);
|
||||
//this.getToken();
|
||||
|
||||
if(!this.pin) {
|
||||
|
||||
Reference in New Issue
Block a user