Element Call: Send rtc.decline event when incoming call is declined (#4499)
This commit is contained in:
@@ -126,6 +126,7 @@ class NotificationHandler {
|
||||
return .processedShouldDiscard
|
||||
case .callNotify(let notifyType):
|
||||
return await handleCallNotification(notifyType: notifyType,
|
||||
rtcNotifyEventID: event.eventId(),
|
||||
timestamp: event.timestamp(),
|
||||
roomID: itemProxy.roomID,
|
||||
roomDisplayName: itemProxy.roomDisplayName)
|
||||
@@ -153,6 +154,7 @@ class NotificationHandler {
|
||||
/// Handle incoming call notifications.
|
||||
/// - Returns: A boolean indicating whether the notification was handled and should now be discarded.
|
||||
private func handleCallNotification(notifyType: NotifyType,
|
||||
rtcNotifyEventID: String,
|
||||
timestamp: Timestamp,
|
||||
roomID: String,
|
||||
roomDisplayName: String) async -> NotificationProcessingResult {
|
||||
@@ -206,7 +208,8 @@ class NotificationHandler {
|
||||
}
|
||||
|
||||
let payload = [ElementCallServiceNotificationKey.roomID.rawValue: roomID,
|
||||
ElementCallServiceNotificationKey.roomDisplayName.rawValue: roomDisplayName]
|
||||
ElementCallServiceNotificationKey.roomDisplayName.rawValue: roomDisplayName,
|
||||
ElementCallServiceNotificationKey.rtcNotifyEventID.rawValue: rtcNotifyEventID]
|
||||
|
||||
do {
|
||||
try await CXProvider.reportNewIncomingVoIPPushPayload(payload)
|
||||
|
||||
Reference in New Issue
Block a user