This commit is contained in:
Peter Maquiran
2022-03-25 17:39:51 +01:00
parent f2cf316329
commit e2721f1091
2 changed files with 13 additions and 10 deletions
+7 -5
View File
@@ -77,17 +77,21 @@ export class MessageService {
this._id = _id
this._updatedAt = _updatedAt || new Date().getTime()
this.file = file
this.attachments = attachments
this.temporaryData = temporaryData
this.localReference = localReference || null
this.id = id
this.delate = delate
this.delateRequest = delateRequest
if(this.attachments?.length >= 1 && attachments?.length >= 1) {
this.attachments[0] = Object.assign(this.attachments[0], attachments[0])
} else {
this.attachments = attachments
}
this.viewed = [...new Set([...viewed,...this.viewed])];
this.received = [...new Set([...received,...this.received])];
if(!this.ts) {
this.offline = true
this.messageSend = false
@@ -105,11 +109,9 @@ export class MessageService {
}
if(this.hasFile) {
if(this.file.type != 'application/webtrix') {
this.displayType = this.file.type.replace('application/','').toUpperCase()
}
}
this.calDateDuration()