fix an issue where incoming call is not showed for non-voip notifications

This commit is contained in:
Ryan Zhao 2022-04-21 13:40:42 +10:00
parent 8821d796dd
commit ad575f6fb5
1 changed files with 3 additions and 3 deletions

View File

@ -174,9 +174,9 @@ public enum MessageReceiver {
// This method was invoked and the received message timestamps table was updated // This method was invoked and the received message timestamps table was updated
// Processing wasn't finished // Processing wasn't finished
// The user doesn't see the new closed group // The user doesn't see the new closed group
} else if let message = message as? CallMessage, message.kind?.description != "preOffer" { } else if message.isKind(of: CallMessage.self) {
// Allow duplicates for all call messages except preOffer which may generate // Allow duplicates for all call messages
// a new incoming call // The double checking will be done on message handling to make sure the messages are for the same ongoing call
} else { } else {
guard !Set(storage.getReceivedMessageTimestamps(using: transaction)).contains(envelope.timestamp) || isRetry else { throw Error.duplicateMessage } guard !Set(storage.getReceivedMessageTimestamps(using: transaction)).contains(envelope.timestamp) || isRetry else { throw Error.duplicateMessage }
storage.addReceivedMessageTimestamp(envelope.timestamp, using: transaction) storage.addReceivedMessageTimestamp(envelope.timestamp, using: transaction)