diff --git a/src/app/interceptors/token.interceptors.ts b/src/app/interceptors/token.interceptors.ts index d087096b8..e85eb81bc 100644 --- a/src/app/interceptors/token.interceptors.ts +++ b/src/app/interceptors/token.interceptors.ts @@ -101,8 +101,8 @@ export class TokenInterceptor implements HttpInterceptor { }), catchError((error) => { console.log(error) - SessionStore.user.Authorization = ""; - SessionStore.user.RefreshToken = ""; + SessionStore.user.Authorization = SessionStore.user.Authorization; + SessionStore.user.RefreshToken = SessionStore.user.RefreshToken; SessionStore.setInativity(false) /* SessionStore.setUrlBeforeInactivity(this.router.url); */ diff --git a/src/app/pages/publications/new-publication/new-publication.page.ts b/src/app/pages/publications/new-publication/new-publication.page.ts index b696a11c7..daecf62fc 100644 --- a/src/app/pages/publications/new-publication/new-publication.page.ts +++ b/src/app/pages/publications/new-publication/new-publication.page.ts @@ -740,12 +740,24 @@ export class NewPublicationPage implements OnInit { if (this.checkFileType.checkFileType(FileExtension) == 'image' || this.checkFileType.checkFileType(FileExtension) == 'video') { let resultUrl = decodeURIComponent(element.url); Filesystem.readFile({ path: resultUrl }).then(async (content) => { - console.log('shared base', content.data) - let fileObject = { - FileBase64: this.removeTextBeforeSlash(content.data, ','), - FileExtension: FileExtension, - OriginalFileName: 'shared', + let fileObject; + if(this.checkFileType.checkFileType(FileExtension) == 'image') { + fileObject = { + FileBase64: this.removeTextBeforeSlash(content.data, ','), + FileExtension: FileExtension, + OriginalFileName: 'shared', + } + + } else if (this.checkFileType.checkFileType(FileExtension) == 'video') { + fileObject = { + FileBase64: 'data:video/mp4;base64,'+ this.removeTextBeforeSlash(content.data, ','), + FileExtension: FileExtension, + OriginalFileName: 'shared', + } + } + console.log('shared base', content.data) + this.seletedContent.push(fileObject) }) } else { diff --git a/src/app/services/chat.service.ts b/src/app/services/chat.service.ts index c650cdf12..236cd2fd0 100644 --- a/src/app/services/chat.service.ts +++ b/src/app/services/chat.service.ts @@ -370,7 +370,7 @@ export class ChatService { async refreshtoken() { - /* if(this.headers && SessionStore.user.ChatData) { + if(this.headers && SessionStore.user.ChatData) { this.headers = this.headers.set('Authorization', 'Bearer ' + SessionStore.user.Authorization); let options = { headers: this.headers @@ -423,7 +423,7 @@ export class ChatService { } else if (!this.headers) { this.setheader() this.refreshtoken() - } */ + } } diff --git a/version/git-version.ts b/version/git-version.ts index f17aeadab..1f15e5358 100644 --- a/version/git-version.ts +++ b/version/git-version.ts @@ -5,7 +5,7 @@ export let versionData = { "lastCommitAuthor": "'Peter Maquiran'", "lastCommitTime": "'Thu Aug 31 12:00:52 2023 +0100'", "lastCommitMessage": "add attachments", - "lastCommitNumber": "1573", + "lastCommitNumber": "1579", "change": "", "changeStatus": "On branch notification-header/feature\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/modals/profile/profile.page.html\n\tmodified: src/app/modals/profile/profile.page.ts\n\tmodified: src/app/services/notifications.service.ts\n\tmodified: src/app/shared/header/header.page.html\n\tmodified: src/app/shared/header/header.page.ts\n\tnew file: src/app/store/notification-holder.service.spec.ts\n\tnew file: src/app/store/notification-holder.service.ts\n\nChanges not staged for commit:\n (use \"git add ...\" to update what will be committed)\n (use \"git restore ...\" to discard changes in working directory)\n\tmodified: src/app/modals/create-process/create-process.page.ts\n\tmodified: src/app/modals/document-detail/document-detail.page.ts\n\tmodified: src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts\n\tmodified: src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html\n\tmodified: src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html", "changeAuthor": "peter.maquiran"