Skip to content

fix: include the level and rank of level-up notifications in the API - #836

Open
sulimanbenhalim wants to merge 1 commit into
dev-null-sh:productionfrom
sulimanbenhalim:fix/api-level-notifications
Open

sulimanbenhalim wants to merge 1 commit into
dev-null-sh:productionfrom
sulimanbenhalim:fix/api-level-notifications

Conversation

@sulimanbenhalim

Copy link
Copy Markdown
Contributor

the web inbox gets level and rank and rank_description for a level-up through Notification::toArray() but NotificationResource lists its fields one by one and never got them
so the app receives a leveled_up notification with no way to tell which level was reached

the rank now comes from a rank() method on the model that both use
added an API test next to the web one and the exact payload test picks up the three new keys

@nunomaduro

Copy link
Copy Markdown
Member

@simonhamp does it make sense for you?

@simonhamp

Copy link
Copy Markdown
Contributor

@nunomaduro yep looks good

simonhamp added a commit to NativePHP/dev-null-app that referenced this pull request Oct 27, 2026
devnull sends a leveled_up notification when you reach a new level, and
the app had no case for it, so it drew one as "Local Dev @you replied to
your commit". Now it names nobody, like a moderation update, with a
"Lv. 5 · wheel" chip in your lane, "You reached level 5: wheel." and the
rank's description underneath. The node uses Lucide's chevrons-up and a
tap opens your profile.

The level, rank and description come from dev-null-sh/dev-null.sh#836.
Until that ships the API sends none of them, so the row says "You
reached a new level." without the chip.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants