fix incorrect incoming call issue

This commit is contained in:
Ryan Zhao 2021-12-20 12:25:05 +11:00
parent 67fdea13bd
commit f1adc9d91d
1 changed files with 1 additions and 0 deletions

View File

@ -92,6 +92,7 @@ public final class NotificationServiceExtension : UNNotificationServiceExtension
}
case let callMessage as CallMessage:
MessageReceiver.handleCallMessage(callMessage, using: transaction)
guard case .preOffer = callMessage.kind else { return self.completeSilenty() }
if !SSKPreferences.areCallsEnabled {
if let sender = callMessage.sender, let thread = TSContactThread.fetch(for: sender, using: transaction), thread.hasOutgoingInteraction(with: transaction) {
let infoMessage = TSInfoMessage.from(callMessage, associatedWith: thread)