fix(healthchat): rewire the NSE and call service to upstream's settings

This commit is contained in:
Sedat Qaja
2026-10-19 09:18:07 +02:00
parent 979d20572d
commit f7d0a05763
2 changed files with 287 additions and 42 deletions
+3 -3
View File
@@ -273,8 +273,8 @@ nonisolated class NotificationHandler {
/// Asks the push gateway to deliver a PushKit push with the call details, the way the legacy
/// element-ios app did. The app's `PKPushRegistryDelegate` then reports the call to CallKit.
private func requestVoIPPush(roomID: String, roomDisplayName: String, rtcNotifyEventID: String, expirationDate: Date, isVoiceCall: Bool) async {
guard let token = settings.pushKitDeviceToken,
let notifyURL = settings.voipPushGatewayNotifyURL.flatMap(URL.init(string:)) else {
guard let token = userSettings.app.pushKitDeviceToken,
let notifyURL = userSettings.app.voipPushGatewayNotifyURL.flatMap(URL.init(string:)) else {
MXLog.warning("No PushKit token or push gateway stored by the app, cannot request a VoIP push")
return
}
@@ -288,7 +288,7 @@ nonisolated class NotificationHandler {
let body: [String: Any] = ["notification": ["event_id": rtcNotifyEventID,
"room_id": roomID,
"prio": "high",
"devices": [["app_id": settings.voipPusherAppID,
"devices": [["app_id": userSettings.app.voipPusherAppID,
"pushkey": token,
"data": ["format": "event_id_only",
"default_payload": defaultPayload]]]]]