mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
fix
This commit is contained in:
@@ -49,7 +49,7 @@ export class MessageService {
|
||||
private WsChatService: WsChatService) {
|
||||
}
|
||||
|
||||
setData({customFields, channels, mentions, msg ,rid ,ts, u, t, _id, _updatedAt, file, attachments, temporaryData, localReference}:Message) {
|
||||
setData({customFields = {}, channels, mentions, msg ,rid ,ts, u, t, _id, _updatedAt, file, attachments, temporaryData, localReference}:Message) {
|
||||
this.customFields = customFields
|
||||
this.channels = channels || []
|
||||
this.mentions = mentions || []
|
||||
@@ -124,7 +124,7 @@ export class MessageService {
|
||||
|
||||
if (environment.chatOffline) {
|
||||
|
||||
this.redefinedMessage(ChatMessage)
|
||||
// this.redefinedMessage(ChatMessage)
|
||||
this.offline = false
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ export class MessageService {
|
||||
let ChatMessage = message.result
|
||||
|
||||
if (environment.chatOffline) {
|
||||
this.redefinedMessage(ChatMessage)
|
||||
// this.redefinedMessage(ChatMessage)
|
||||
this.offline = false
|
||||
}
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@ export class NfService {
|
||||
downloadFileMsg = async (message: MessageService, room?: RoomService): Promise<boolean> => new Promise ((resolve, reject)=> (resolve(true)));
|
||||
|
||||
fix_updatedAt(message) {
|
||||
if (message.result) {
|
||||
if (message?.result) {
|
||||
message.result._updatedAt = message.result._updatedAt['$date']
|
||||
} else if(message._updatedAt) {
|
||||
} else if(message?._updatedAt) {
|
||||
if(message._updatedAt.hasOwnProperty('$date')) {
|
||||
message._updatedAt = message._updatedAt['$date']
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ export class RoomService {
|
||||
this.NativeNotificationService.askForPermission()
|
||||
}
|
||||
|
||||
setData({ customFields, id, name, t, lastMessage = new MessageService(this.storage, this.NfService, this.WsChatService), _updatedAt }) {
|
||||
setData({ customFields = {}, id, name, t, lastMessage = new MessageService(this.storage, this.NfService, this.WsChatService), _updatedAt }) {
|
||||
this.customFields = customFields
|
||||
this.id = id
|
||||
this.name = name
|
||||
@@ -184,7 +184,7 @@ export class RoomService {
|
||||
let index;
|
||||
const find = messages.find((message, _index)=> {
|
||||
if(message.localReference) {
|
||||
if(message.localReference == ChatMessage.localReference) {
|
||||
if(message?.localReference == ChatMessage?.localReference) {
|
||||
index = _index
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user