This commit is contained in:
Peter Maquiran
2022-02-07 15:51:21 +01:00
parent fe2bd52be3
commit 2caaad7f2b
7 changed files with 20 additions and 22 deletions
+7 -12
View File
@@ -1,6 +1,5 @@
import { Injectable } from '@angular/core';
import { Message } from 'src/app/models/chatMethod';
import { chatHistory, ChatMessage, File } from 'src/app/models/chatMethod'
import { Storage } from '@ionic/storage';
import { SessionStore } from 'src/app/store/session.service';
import { capitalizeTxt } from 'src/plugin/text'
@@ -24,11 +23,12 @@ export class MessageService {
attachments
offline = true
displayType = ''
temporaryData = {}
constructor(private storage: Storage) {
}
setData({customFields, channels, mentions, msg ,rid ,ts, u, t, _id, _updatedAt, file, attachments}:Message) {
setData({customFields, channels, mentions, msg ,rid ,ts, u, t, _id, _updatedAt, file, attachments, temporaryData}:Message) {
this.customFields = customFields
this.channels = channels || []
this.mentions = mentions || []
@@ -41,6 +41,7 @@ export class MessageService {
this._updatedAt = _updatedAt || new Date().getTime()
this.file = file
this.attachments = attachments
this,temporaryData = {}
if(!this.ts) {
this.offline = true
@@ -62,15 +63,6 @@ export class MessageService {
}
delete() {}
showDateDuration() {}
resend() {
}
private usernameToDisplayName(username) {
const firstName = capitalizeTxt(username.split('.')[0])
@@ -78,7 +70,6 @@ export class MessageService {
return firstName + ' ' + lastName
}
getFileFromDb() {
if (this.file) {
if (this.file.guid) {
@@ -92,4 +83,8 @@ export class MessageService {
}
}
sendFile() {
}
}