Bug session expired resolved

This commit is contained in:
Eudes Inácio
2022-06-08 11:56:56 +01:00
parent f1e8cedc35
commit 73d0696ea6
15 changed files with 121 additions and 9 deletions
@@ -31,6 +31,7 @@ import { AlertController, Platform } from '@ionic/angular';
import { File } from '@awesome-cordova-plugins/file/ngx';
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
import { SessionStore } from 'src/app/store/session.service';
import { HttpErrorResponse } from '@angular/common/http';
const IMAGE_DIR = 'stored-images';
@@ -524,6 +525,12 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.members = res['members'];
this.dmUsers = res['members'].filter(data => data.username != this.sessionStore.user.UserName)
this.showLoader = false;
},(error: HttpErrorResponse) => {
if(error.status === 401){
this.chatService.refreshtoken()
this.getChatMembers();
}
});
}