diff --git a/Monal/another.im/AnotherIMApp.swift b/Monal/another.im/AnotherIMApp.swift index 110de8c..748a07c 100644 --- a/Monal/another.im/AnotherIMApp.swift +++ b/Monal/another.im/AnotherIMApp.swift @@ -25,6 +25,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } func applicationDidEnterBackground(_: UIApplication) { - MLXMPPManager.sharedInstance().nowBackgrounded() + // MLXMPPManager.sharedInstance().nowBackgrounded() } } diff --git a/Monal/another.im/XMPP/Wrappers/WrapperChat.swift b/Monal/another.im/XMPP/Wrappers/WrapperChat.swift index cb29150..307b785 100644 --- a/Monal/another.im/XMPP/Wrappers/WrapperChat.swift +++ b/Monal/another.im/XMPP/Wrappers/WrapperChat.swift @@ -63,6 +63,7 @@ final class WrapperChat: ObservableObject { deinit { notificationObservers.forEach { NotificationCenter.default.removeObserver($0) } + print("Chat wrapper deinit") } var chatTitle: String { @@ -139,6 +140,7 @@ private extension WrapperChat { default: guard let mlMessage = notification.userInfo?["message"] as? MLMessage else { return } guard let message = Message(mlMessage) else { return } + guard message.accountId == contact.ownerId, message.participantJid == contact.contactJid else { return } if let index = messages.firstIndex(where: { $0.id == message.id }) { messages[index] = message } else { diff --git a/Monal/another.im/XMPP/Wrappers/WrapperXMPP.swift b/Monal/another.im/XMPP/Wrappers/WrapperXMPP.swift index 1da84a1..499cd3b 100644 --- a/Monal/another.im/XMPP/Wrappers/WrapperXMPP.swift +++ b/Monal/another.im/XMPP/Wrappers/WrapperXMPP.swift @@ -30,6 +30,7 @@ final class WrapperXMPP: ObservableObject { deinit { notificationObservers.forEach { NotificationCenter.default.removeObserver($0) } + print("XMPP wrapper deinit") } }