diff --git a/src/app/modals/view-media/view-media.page.ts b/src/app/modals/view-media/view-media.page.ts index 947ada974..fd64d9262 100644 --- a/src/app/modals/view-media/view-media.page.ts +++ b/src/app/modals/view-media/view-media.page.ts @@ -37,7 +37,7 @@ export class ViewMediaPage implements OnInit { } ngOnInit() { - console.log(this.image) + // console.log(this.image) this.base64Sanitize = this.sanitizer.bypassSecurityTrustResourceUrl(this.image); if (this.platform.is('desktop')) { diff --git a/src/app/services/chat.service.ts b/src/app/services/chat.service.ts index 939f42d2d..7bf3c146f 100644 --- a/src/app/services/chat.service.ts +++ b/src/app/services/chat.service.ts @@ -342,6 +342,7 @@ export class ChatService { setheader() { try { + if (this.p.userPermission(this.p.permissionList.Chat.access)) { this.headers = new HttpHeaders(); @@ -352,6 +353,8 @@ export class ChatService { this.options = { headers: this.headers, }; + + this.resetTimer() } } } catch (error) { @@ -386,4 +389,14 @@ export class ChatService { } + + functionTimer = null; + + resetTimer() { + clearTimeout(this.functionTimer); + this.functionTimer = setTimeout(()=>{ + this.refreshtoken(); + }, 60000 * 5); // time is in milliseconds + } + }