Don't block on intent donation.

This commit is contained in:
Matthew Chen 2021-09-16 15:47:49 -03:00
parent c2a71d62f1
commit c9cedeb8d6

View File

@ -243,23 +243,15 @@ class UserNotificationPresenterAdaptee: NSObject, NotificationPresenterAdaptee {
Logger.info("Will donate interaction")
}
let group = DispatchGroup()
group.enter()
interaction.donate(completion: { error in
if DebugFlags.internalLogging { Logger.info("Did donate interaction") }
group.leave()
if let error = error {
owsFailDebug("Failed to donate incoming message intent \(error)")
return
}
})
if case .timedOut = group.wait(timeout: .now() + 1.0) {
Logger.warn("Timed out donating intent")
}
if DebugFlags.internalLogging {
Logger.info("Will update notification content with intent")
}