-
Notifications
You must be signed in to change notification settings - Fork 531
support read/unread status for notifications #11664
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
Conversation
- displayAsRead boolean added to "get all" - new GET unreadCount API endpoint - new PUT markAsRead API endpoint
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
sekmiller
left a comment
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.
Looks good. Thanks for the quick fix on the doc
|
📦 Pushed preview images as 🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
|
EDIT: was able to reproduce issue on the develop branch - created a separate issue to track this: #11683 |
|
Testing Passed - Merging. 11 |
What this PR does / why we need it:
Which issue(s) this PR closes:
Special notes for your reviewer:
NotificationsIT points out two APIs that don't generate notifications at all:
They probably should! And there are probably others. I opened this issue a while ago (10+ years!) about this:
As I mentioned in Slack, we could maybe go with just "read", "unread" (what GitHub uses), or "hasBeenRead" instead of "displayAsRead" (which comes from a transient variable used by JSF).
Existing methods in Notifications.java use a funny pattern to get an authenticated user. Methods I added use our standard getRequestAuthenticatedUserOrDie.
@ekraffmiller mentioned that #11648 is related and I plan to take a look, at least. I think a fix might be better as a follow up pull request. Update: a draft, for now:
Here are some related GitHub APIs I looked at:
They obviously store timestamps for when notifications were read but we only store booleans.
Suggestions on how to test this:
Try the endpoints mentioned in the docs for this PR.
Automated tests are also included. Make sure they are passing.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No.
Is there a release notes update needed for this change?:
Yes, included.
Additional documentation:
Preview at https://dataverse-guide--11664.org.readthedocs.build/en/11664/api/native-api.html#notifications