From de7da593b7e7619c29515d01870fbbc351c8959f Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 19 May 2026 17:12:12 +0300 Subject: [PATCH] nse: attach group avatar to communication notification --- modules/BlueskyNSE/NotificationService.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/BlueskyNSE/NotificationService.swift b/modules/BlueskyNSE/NotificationService.swift index a9c38a036c..18b63b1606 100644 --- a/modules/BlueskyNSE/NotificationService.swift +++ b/modules/BlueskyNSE/NotificationService.swift @@ -120,6 +120,15 @@ class NotificationService: UNNotificationServiceExtension { attachments: nil ) + // For group convos, attach the composite group avatar (rendered by the + // ogcard service) to the `speakableGroupName` parameter so iOS shows it + // alongside the sender on the Communication Notification. + if userInfo["convoKind"] as? String == "group", + let convoAvatarUrlString = userInfo["convoAvatarUrl"] as? String, + let groupImage = downloadAvatarImage(from: convoAvatarUrlString) { + intent.setImage(groupImage, forParameterNamed: \.speakableGroupName) + } + let interaction = INInteraction(intent: intent, response: nil) interaction.direction = .incoming interaction.donate(completion: nil)