Element Call: Send rtc.decline event when incoming call is declined (#4499)

This commit is contained in:
Valere Fedronic
2025-09-16 10:14:04 +02:00
committed by GitHub
parent f6d3992601
commit dc1f174d40
6 changed files with 121 additions and 3 deletions

View File

@@ -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)