mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 11:58:32 +00:00
Element Call: Send rtc.decline event when incoming call is declined (#4499)
This commit is contained in:
@@ -639,6 +639,16 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
|
||||
ElementCallWidgetDriver(room: room, deviceID: deviceID)
|
||||
}
|
||||
|
||||
func declineCall(notificationID: String) async -> Result<Void, RoomProxyError> {
|
||||
do {
|
||||
try await room.declineCall(rtcNotificationEventId: notificationID)
|
||||
return .success(())
|
||||
} catch {
|
||||
MXLog.error("Failed to decline rtc notification \(notificationID) with error: \(error)")
|
||||
return .failure(.sdkError(error))
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Permalinks
|
||||
|
||||
func matrixToPermalink() async -> Result<URL, RoomProxyError> {
|
||||
|
||||
@@ -169,6 +169,7 @@ protocol JoinedRoomProxyProtocol: RoomProxyProtocol {
|
||||
// MARK: - Element Call
|
||||
|
||||
func elementCallWidgetDriver(deviceID: String) -> ElementCallWidgetDriverProtocol
|
||||
func declineCall(notificationID: String) async -> Result<Void, RoomProxyError>
|
||||
|
||||
// MARK: - Permalinks
|
||||
|
||||
|
||||
Reference in New Issue
Block a user