From a22f0e9d5d9145db02786ed8a927e665b72f5074 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 22 Apr 2026 15:12:03 +0300 Subject: [PATCH] show recipient handle as subtitle in chat communication notifications The push title contains "Sender to @recipient" but Communication Notifications replace the title with the sender name, losing the recipient info. Extract "to @recipient" and set it as the subtitle. Co-Authored-By: Claude Opus 4.6 (1M context) --- modules/BlueskyNSE/NotificationService.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/BlueskyNSE/NotificationService.swift b/modules/BlueskyNSE/NotificationService.swift index b441f48a91..c042a502e7 100644 --- a/modules/BlueskyNSE/NotificationService.swift +++ b/modules/BlueskyNSE/NotificationService.swift @@ -71,6 +71,14 @@ class NotificationService: UNNotificationServiceExtension { ) -> UNNotificationContent { let senderDisplayName = userInfo["senderDisplayName"] as? String ?? "Unknown" let convoId = userInfo["convoId"] as? String + + // The push title is "Sender to @recipient" — extract the "to @recipient" + // part as subtitle so the user knows which account received the message. + if let title = content.title as String?, + let range = title.range(of: " to ", options: .backwards) { + content.subtitle = String(title[range.upperBound...]) + } + var avatarImage: INImage? = nil if let avatarUrlString = userInfo["senderAvatarUrl"] as? String { avatarImage = downloadAvatarImage(from: avatarUrlString)