mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
chat
This commit is contained in:
@@ -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() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user