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
+5 -3
View File
@@ -95,10 +95,12 @@ export class ChatSystemService {
}
loadChat() {
this.ReLoadChat()
if(SessionStore.user.ChatData) {
this.ReLoadChat()
}
}
async ReLoadChat() {
private async ReLoadChat() {
await this.chatService.refreshtoken();
await this.restoreUsers();
@@ -400,7 +402,7 @@ export class ChatSystemService {
if (setData.name != 'Rocket Cat') {
// create room
if(!this.roomExist(roomId)) {
let room:RoomService = new RoomService(this.RochetChatConnectorService, new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService), this.storage, this.platform, this.sqlservice, this.NativeNotificationService, this.sortService, this.ChatService, this.NfService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService, this)
let room:RoomService = new RoomService(this.RochetChatConnectorService, new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService, this), this.storage, this.platform, this.sqlservice, this.NativeNotificationService, this.sortService, this.ChatService, this.NfService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService, this)
room.setData(setData)
room.receiveMessage()
room.getAllUsers = this.getUsers