diff --git a/src/app/shared/chat/group-messages/group-messages.page.ts b/src/app/shared/chat/group-messages/group-messages.page.ts index 7be23ce8a..f4b11c203 100644 --- a/src/app/shared/chat/group-messages/group-messages.page.ts +++ b/src/app/shared/chat/group-messages/group-messages.page.ts @@ -103,7 +103,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe private changeDetectorRef: ChangeDetectorRef, private storage: Storage, private AttachmentsService: AttachmentsService, - + private CameraService: CameraService, private toastService: ToastService, @@ -477,7 +477,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe if (res) { const data = res.data; this.documents.push(data.selected); - + this.addFileWebtrix() } }); @@ -544,7 +544,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe async takePicture() { const roomId = this.roomId - + const image = await this.CameraService.takePicture(); await this.fileService.saveImage(image) const lastphoto: any = await this.fileService.loadFiles(); @@ -571,11 +571,11 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe }) } - + async addImage() { this.addFileToChat(['image/apng', 'image/jpeg', 'image/png']) } - + async addFile() { this.addFileToChat(['.doc', '.docx', '.pdf']) } @@ -599,7 +599,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe if(data.selected) { const loader = this.toastService.loading(); - this.wsChatMethodsService.getDmRoom(roomId).send({ + this.wsChatMethodsService.getGroupRoom(roomId).send({ file:{ "name": res.data.selected.Assunto, "type": "application/webtrix", @@ -632,13 +632,13 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe async addFileToChat(types: typeof FileType[] ) { const roomId = this.roomId - + const file: any = await this.fileService.getFileFromDevice(types); const imageData = await this.fileToBase64Service.convert(file) const formData = new FormData(); formData.append("blobFile", file); - + this.wsChatMethodsService.getDmRoom(roomId).send({ file: { "type": "application/img", @@ -729,7 +729,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe else if (res['data'] == 'documentoGestaoDocumental') { this.addFileWebtrix() - + this.showLoader = false; }