-
Notifications
You must be signed in to change notification settings - Fork 912
Add JSON response support for notifications/tray
#2398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| json.creator notification.creator, partial: "users/user", as: :user | ||
| json.creator do | ||
| json.partial! "users/user", user: notification.creator | ||
| json.avatar_url user_avatar_url(notification.creator) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jorgemanrubia Do you see any reason why we couldn't include the avatar url in the existing user partial?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@svara should be fine to add it to the user partial
847574f to
e6e395f
Compare
Add avatar url, board name, and column.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Includes assignee users in the card object for display in notification UI. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
These fields were added but are not used by the iOS client. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
e6e395f to
a3aefba
Compare
f604f0e to
d954ec9
Compare
| def show | ||
| @notifications = Current.user.notifications.preloaded.unread.ordered.limit(100) | ||
| @notifications = unread_notifications | ||
| if include_unread? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@svara added this query parameter instead of checking for format.json. Let me know if you have any concerns.
Updated
notification/trayJSON for mobile app requirements: