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
// Processing wasn't finished
// The user doesn't see the new closed group
} else if let message = message as? CallMessage, message.kind?.description != "preOffer" {
// Allow duplicates for all call messages except preOffer which may generate
// a new incoming call
} else if message.isKind(of: CallMessage.self) {
// Allow duplicates for all call messages
// The double checking will be done on message handling to make sure the messages are for the same ongoing call
} else {
guard !Set(storage.getReceivedMessageTimestamps(using: transaction)).contains(envelope.timestamp) || isRetry else { throw Error.duplicateMessage }
storage.addReceivedMessageTimestamp(envelope.timestamp, using: transaction)