mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
save
This commit is contained in:
@@ -7,6 +7,7 @@ import { chatHistory, ChatMessage, File } from 'src/app/models/chatMethod'
|
||||
})
|
||||
export class MessageService {
|
||||
|
||||
customFields
|
||||
channels = []
|
||||
mentions = []
|
||||
msg = ''
|
||||
@@ -20,7 +21,8 @@ export class MessageService {
|
||||
|
||||
constructor() { }
|
||||
|
||||
setData({channels, mentions, msg ,rid ,ts, u, _id, _updatedAt, file, attachments}:Message) {
|
||||
setData({customFields, channels, mentions, msg ,rid ,ts, u, _id, _updatedAt, file, attachments}:Message) {
|
||||
this.customFields = customFields
|
||||
this.channels = channels
|
||||
this.mentions = mentions
|
||||
this.msg = msg
|
||||
|
||||
@@ -14,8 +14,9 @@ export class RoomService {
|
||||
lastMessage: MessageService;
|
||||
|
||||
chatUser: ChatUserService[] = []
|
||||
customFields:any;
|
||||
id = ''
|
||||
name = 'teste'
|
||||
name = ''
|
||||
_updatedAt = {}
|
||||
private hasLoadHistory = false
|
||||
duration = ''
|
||||
@@ -27,7 +28,8 @@ export class RoomService {
|
||||
private MessageService: MessageService,
|
||||
) {}
|
||||
|
||||
setData({id, name, lastMessage, _updatedAt}) {
|
||||
setData({customFields, id, name, lastMessage, _updatedAt}) {
|
||||
this.customFields = customFields
|
||||
this.id = id
|
||||
this.name = name
|
||||
this.lastMessage = lastMessage
|
||||
|
||||
@@ -47,10 +47,11 @@ export class WsChatMethodsService {
|
||||
|
||||
room = new RoomService(this.WsChatService, new MessageService())
|
||||
room.setData({
|
||||
customFields: roomData.customFields,
|
||||
id: this.getRoomId(roomData),
|
||||
name: this.getRoomName(roomData),
|
||||
lastMessage: this.getRoomLastMessage(roomData),
|
||||
_updatedAt: roomData._updatedAt['$date']
|
||||
_updatedAt: new Date(roomData._updatedAt['$date'])
|
||||
})
|
||||
|
||||
room.receiveMessage()
|
||||
|
||||
Reference in New Issue
Block a user