From 614ab159af76a87b73c572931b232a2193138e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20M=C3=BCller?= Date: Sun, 5 Jul 2026 23:57:48 +0200 Subject: [PATCH] updated notification subject parsing to support newline separators for sender and message, while maintaining a fallback for legacy colon-delimited formats. --- .../NotificationService.swift | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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[..