improve message service

This commit is contained in:
Peter Maquiran
2022-01-13 10:52:03 +01:00
parent 8386781f77
commit 3565d5ceb2
3 changed files with 120 additions and 16 deletions
+7 -4
View File
@@ -1,4 +1,6 @@
import { Injectable } from '@angular/core';
import { Message } from 'src/app/models/chatMethod';
import { chatHistory, ChatMessage, File } from 'src/app/models/chatMethod'
@Injectable({
providedIn: 'root'
@@ -13,10 +15,12 @@ export class MessageService {
u = {}
_id =''
_updatedAt = {}
file
attachments
constructor() { }
setData({channels, mentions, msg ,rid ,ts, u, _id, _updatedAt}) {
setData({channels, mentions, msg ,rid ,ts, u, _id, _updatedAt, file, attachments}:Message) {
this.channels = channels
this.mentions = mentions
this.msg = msg
@@ -25,13 +29,12 @@ export class MessageService {
this.u = u
this._id = _id
this._updatedAt = _updatedAt
this.file = file
this.attachments = attachments
}
delete() {}
showDateDuration() {}
}