From ad575f6fb55c73586d47b99895945995a6c4d4e2 Mon Sep 17 00:00:00 2001 From: Ryan Zhao Date: Thu, 21 Apr 2022 13:40:42 +1000 Subject: [PATCH] fix an issue where incoming call is not showed for non-voip notifications --- .../Sending & Receiving/MessageReceiver.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SessionMessagingKit/Sending & Receiving/MessageReceiver.swift b/SessionMessagingKit/Sending & Receiving/MessageReceiver.swift index 64b6006fc..c2dd610e3 100644 --- a/SessionMessagingKit/Sending & Receiving/MessageReceiver.swift +++ b/SessionMessagingKit/Sending & Receiving/MessageReceiver.swift @@ -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)