mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Automatically silence ringing calls after 15 seconds of inactivity
This commit is contained in:
committed by
Stefan Ceriu
parent
f6c476eeca
commit
e76fabf18c
@@ -124,6 +124,13 @@ class ElementCallService: NSObject, ElementCallServiceProtocol, PKPushRegistryDe
|
|||||||
|
|
||||||
completion()
|
completion()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Task { [weak self, callProvider, callID] in
|
||||||
|
try? await Task.sleep(for: .seconds(15))
|
||||||
|
if let ongoingCallID = self?.ongoingCallID, ongoingCallID == callID {
|
||||||
|
callProvider.reportCall(with: callID, endedAt: .now, reason: .unanswered)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - CXProviderDelegate
|
// MARK: - CXProviderDelegate
|
||||||
|
|||||||
Reference in New Issue
Block a user