diff --git a/TelegramCore/ProcessSecretChatIncomingDecryptedOperations.swift b/TelegramCore/ProcessSecretChatIncomingDecryptedOperations.swift index aa5a5e015d..61053160a0 100644 --- a/TelegramCore/ProcessSecretChatIncomingDecryptedOperations.swift +++ b/TelegramCore/ProcessSecretChatIncomingDecryptedOperations.swift @@ -110,6 +110,7 @@ func processSecretChatIncomingDecryptedOperations(mediaBox: MediaBox, transactio if let operation = entry.contents as? SecretChatIncomingDecryptedOperation { do { var message: StoreMessage? + var contentParsingError = false var resources: [(MediaResource, Data)] = [] var serviceAction: SecretChatServiceAction? @@ -147,7 +148,7 @@ func processSecretChatIncomingDecryptedOperations(mediaBox: MediaBox, transactio } serviceAction = SecretChatServiceAction(apiMessage) } else { - throw MessageParsingError.contentParsingError + contentParsingError = true } } @@ -288,6 +289,8 @@ func processSecretChatIncomingDecryptedOperations(mediaBox: MediaBox, transactio } let _ = transaction.addMessages([message], location: .Random) addedMessages.append(message) + } else if contentParsingError { + Logger.shared.log("SecretChat", "Couldn't parse secret message content") } } catch let error { if let error = error as? MessageParsingError { diff --git a/TelegramCore/UpdatePeers.swift b/TelegramCore/UpdatePeers.swift index 9bf3f15ebc..86270d25fd 100644 --- a/TelegramCore/UpdatePeers.swift +++ b/TelegramCore/UpdatePeers.swift @@ -80,6 +80,8 @@ public func updatePeers(transaction: Transaction, peers: [Peer], update: (Peer?, } case .left: updatedInclusion = .never + case .kicked where channel.creationDate == 0: + updatedInclusion = .never default: if currentInclusion == .notSpecified { updatedInclusion = .never