fix merge

This commit is contained in:
Peter Maquiran
2022-04-07 14:40:37 +01:00
30 changed files with 1554 additions and 603 deletions
+6 -3
View File
@@ -30,12 +30,13 @@ export class ChatService {
private authService: AuthService,
private storage: Storage,
private storageService:StorageService,
public p: PermissionService,
)
{
public p: PermissionService) {
if(this.p.userPermission(this.p.permissionList.Chat.access)){
this.loggedUserChat = authService.ValidatedUserChat;
this.headers = new HttpHeaders();
if(this.p.userPermission(this.p.permissionList.Chat.access)) {
this.headers = this.headers.set('X-User-Id', this.loggedUserChat['data'].userId);
this.headers = this.headers.set('X-Auth-Token', this.loggedUserChat['data'].authToken);
@@ -46,6 +47,8 @@ export class ChatService {
}
}
getDocumentDetails(url:string){
let headersc = new HttpHeaders();
headersc = headersc.set('X-User-Id', this.loggedUserChat['data'].userId);
+9 -4
View File
@@ -233,12 +233,17 @@ export class MessageService {
} else if (event.type === HttpEventType.Response) {
if (this.file.type == "application/img") {
downloadFile = 'data:image/jpeg;base64,' + btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''));
} else if (this.file.type === 'application/pdf') {
} else if (this.file.type != "application/img") {
downloadFile = event.body as any;
} else if (this.file.type == 'application/audio') {
downloadFile = new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), '');
}
console.log(downloadFile)
} /* else if (this.file.type == 'application/audio') {
downloadFile = new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), '');
} else if (this.file.type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
downloadFile = new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), '');
} */
console.log('Download file ',downloadFile )
this.attachments[0] = {
image_url: downloadFile,