fix slow chat

This commit is contained in:
Peter Maquiran
2024-01-30 14:09:30 +01:00
parent 07939149ee
commit 46373ccc6e
+10 -4
View File
@@ -334,22 +334,28 @@ export class RoomService {
message.loadHistory = this.DoneLoadingHistory
this.lastMessage = message;
this.calDateDuration(ChatMessage._updatedAt);
try {
this.calDateDuration(ChatMessage._updatedAt);
} catch (error) {
console.log(error)
}
if (message.t == 'r') {
this.name = message.msg;
}
if (this.isSenderIsNotMe(ChatMessage)) {
//if (this.isSenderIsNotMe(ChatMessage)) {
/* this.NativeNotificationService.sendNotificationChat({
message: message.msg,
title: this.name
}); */
}
//}
if (this.hasLoadHistory == true) {
this.messages.push(message)
await message.addMessageDB()
message.addMessageDB()
} else {
this.messagesBeforeOfflineAPI.push(message)
}