ios: better filtering of notificaitons in NSE (to avoid event notifications) (#2722)

This commit is contained in:
Evgeny Poberezkin
2023-07-19 12:14:27 +01:00
committed by GitHub
parent bf4df9ca58
commit 4b652b62da
2 changed files with 1 additions and 9 deletions
@@ -275,7 +275,7 @@ func receivedMsgNtf(_ res: ChatResponse) async -> (String, NSENotification)? {
cItem = autoReceiveFile(file) ?? cItem
}
let ntf: NSENotification = cInfo.ntfsEnabled ? .nse(notification: createMessageReceivedNtf(user, cInfo, cItem)) : .empty
return cItem.showMutableNotification ? (aChatItem.chatId, ntf) : nil
return cItem.showNotification ? (aChatItem.chatId, ntf) : nil
case let .rcvFileSndCancelled(_, aChatItem, _):
cleanupFile(aChatItem)
return nil
-8
View File
@@ -2064,14 +2064,6 @@ public struct ChatItem: Identifiable, Decodable {
return nil
}
public var showMutableNotification: Bool {
switch content {
case .rcvCall: return false
case .rcvChatFeature: return false
default: return showNtfDir
}
}
public var memberDisplayName: String? {
get {
if case let .groupRcv(groupMember) = chatDir {