diff --git a/ios/NotificationServiceExtension/NotificationService.swift b/ios/NotificationServiceExtension/NotificationService.swift index 55e9d8e..9a85390 100644 --- a/ios/NotificationServiceExtension/NotificationService.swift +++ b/ios/NotificationServiceExtension/NotificationService.swift @@ -150,8 +150,20 @@ class NotificationService: UNNotificationServiceExtension { // delivered notifications). } - /// Splits `"Sender: message"` into its parts; falls back to a generic sender. + /// Splits a Talk subject into header and message. nextcloud/spreed's + /// Notifier separates them with a NEWLINE — `"{user}\n{message}"` for 1:1 + /// chats, `"{user} in {call}\n{message}"` for groups (verified against + /// spreed; mirrors parseTalkSubject in lib/push/push_subject.dart). The + /// legacy `": "` form is kept as fallback for older payloads. private func splitSender(_ subject: String) -> (String, String) { + if let range = subject.range(of: "\n") { + let sender = String(subject[..