bug fix in chat view

This commit is contained in:
tiago.kayaya
2022-01-28 15:31:52 +01:00
parent 8756462665
commit 5a214aebf4
12 changed files with 145 additions and 49 deletions
+5 -13
View File
@@ -107,8 +107,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.wsChatMethodsService.getDmRoom(this.roomId).massages.forEach((element) => {
console.log('DATATATA 11', element)
}) */
//this.transformData(this.wsChatMethodsService.getDmRoom(this.roomId).massages)
//this.getMessageDB()
@@ -254,16 +254,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.message = "";
}
deleteMessage(msgId: string) {
let body = {
"roomId": this.roomId,
"msgId": msgId,
"asUser": false,
}
this.alertService.confirmDeleteMessage(body);
/* this.chatService.deleteMessage(body).subscribe(res=>{
console.log(res);
}); */
deleteMessage(msgId: string, room:any) {
this.alertService.confirmDeleteMessage(msgId, room);
}
async viewDocument(msg: any, url?: string) {
@@ -637,7 +629,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
console.log('FILE TYPE 33', msg.file.type)
} else if (event.type === HttpEventType.Response) {
this.downloadFile = 'data:image/jpeg;base64,' + btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''));
msg.file = {
guid: msg.file.guid,
image_url: this.downloadFile,