+
diff --git a/src/app/shared/chat/messages/messages.page.ts b/src/app/shared/chat/messages/messages.page.ts
index d48d45c12..3cd9f78ef 100644
--- a/src/app/shared/chat/messages/messages.page.ts
+++ b/src/app/shared/chat/messages/messages.page.ts
@@ -245,14 +245,16 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
})
}
- viewDocument(file:any, url?:string){
- if(file.type == "application/img"){
- console.log(file);
+ async viewDocument(msg:any, url?:string){
+ if(msg.file.type == "application/img"){
+ let response:any = await this.fileService.getFile(msg.file.guid).toPromise();
+ console.log(response);
+
+ //this.openPreview(msg);
- //this.fileService.getFile().toPromise();
}
- else if(file.type == "application/webtrix") {
- this.openViewDocumentModal(file);
+ else if(msg.file.type == "application/webtrix") {
+ this.openViewDocumentModal(msg.file);
}
else{
let fullUrl;