Add creator initials and avatar color to push notification payload

Move avatar_background_color logic from helper to User::Avatar concern
so it can be accessed from models. Include creator_id, creator_initials,
and creator_avatar_color in native push notifications for local avatar
rendering on iOS.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Fernando Olivares
2026-01-25 22:22:25 -06:00
committed by Rosa Gutierrez
parent 113e61d418
commit b1cdb72381
3 changed files with 14 additions and 8 deletions
@@ -34,7 +34,10 @@ class Notification::PushTarget::Native < Notification::PushTarget
avatar_url: payload.avatar_url,
card_id: card&.id,
card_title: card&.title,
creator_id: notification.creator.id,
creator_name: notification.creator.name,
creator_initials: notification.creator.initials,
creator_avatar_color: notification.creator.avatar_background_color,
category: payload.category
)
.new(