nse: attach group avatar to communication notification

This commit is contained in:
Samuel Newman
2026-05-19 17:12:12 +03:00
parent ee8786943c
commit de7da593b7
@@ -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)