fix chat eror

This commit is contained in:
Peter Maquiran
2022-12-17 12:34:56 +01:00
parent a1ee9d711a
commit c357966d2e
3 changed files with 26 additions and 12 deletions
+7 -6
View File
@@ -184,7 +184,7 @@ export class RoomService {
}
}
setData({membersExcludeMe, members, u, customFields = {}, id, name, t, lastMessage = new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService), _updatedAt }) {
setData({membersExcludeMe, members, u, customFields = {}, id, name, t, lastMessage = new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService, this.ChatSystemService), _updatedAt }) {
this.customFields = customFields
this.id = id
this.name = name
@@ -710,10 +710,11 @@ export class RoomService {
} else {
const offlineMessage = await this.prepareMessageCreateIfNotExist({message:ChatMessage})
offlineMessage.from = 'Offline'
offlineMessage.loadHistory = this.hasLoadHistory
if(offlineMessage) {
offlineMessage.from = 'Offline'
offlineMessage.loadHistory = this.hasLoadHistory
this.messagesLocalReference.push(offlineMessage.localReference)
offlineMessage?.decryptMessage()
@@ -827,7 +828,7 @@ export class RoomService {
message = this.fix_updatedAt(message)
const wewMessage = new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService)
const wewMessage = new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService, this.ChatSystemService)
wewMessage.setData(message)
wewMessage.loadHistory = this.hasLoadHistory
@@ -884,7 +885,7 @@ export class RoomService {
async prepareCreate({message, save = true}): Promise<MessageService> {
message = this.fix_updatedAt(message)
const wewMessage = new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService)
const wewMessage = new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService, this.ChatSystemService)
wewMessage.setData(message)
wewMessage.loadHistory = this.hasLoadHistory
@@ -922,7 +923,7 @@ export class RoomService {
simplePrepareMessage(message) {
message = this.fix_updatedAt(message)
const wewMessage = new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService)
const wewMessage = new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService, this.ChatSystemService)
wewMessage.setData(message)
wewMessage.loadHistory = this.hasLoadHistory