mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
some changes
This commit is contained in:
@@ -334,7 +334,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
console.log('GET FILE WEB', foo )
|
||||
});
|
||||
|
||||
this.storageservice.get('chatmsg').then((msg) => {
|
||||
this.storageservice.get('chatmsg').then(async (msg) => {
|
||||
let msgArray =[];
|
||||
msgArray = msg;
|
||||
msgArray.filter(data => data._id != this.roomId);
|
||||
@@ -344,25 +344,29 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
let newmgsArray = [];
|
||||
msgArray.forEach(async element => {
|
||||
console.log('GET FILE TRANSFORM',element.file.guid )
|
||||
if(element.file.guid == msg.file.guid) {
|
||||
let chatmsg = {
|
||||
_id: element._id,
|
||||
attachments: element.attachments,
|
||||
channels: element.channels,
|
||||
file: element.file,
|
||||
mentions: element.mentions,
|
||||
msg: element.msg,
|
||||
rid: element.rid,
|
||||
ts: element.ts,
|
||||
u: element.u,
|
||||
_updatedAt: element._updatedAt,
|
||||
image_url: this.downloadFile
|
||||
try {
|
||||
if(element.file.guid == msg.file.guid) {
|
||||
let chatmsg = {
|
||||
_id: element._id,
|
||||
attachments: element.attachments,
|
||||
channels: element.channels,
|
||||
file: element.file,
|
||||
mentions: element.mentions,
|
||||
msg: element.msg,
|
||||
rid: element.rid,
|
||||
ts: element.ts,
|
||||
u: element.u,
|
||||
_updatedAt: element._updatedAt,
|
||||
image_url: this.downloadFile
|
||||
}
|
||||
newmgsArray.push(chatmsg)
|
||||
}
|
||||
newmgsArray.push(chatmsg)
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
this.storageservice.store('chatmsg',newmgsArray);
|
||||
await this.storageservice.remove('chatmsg');
|
||||
await this.storageservice.store('chatmsg',newmgsArray);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user