feat(lemmyv1): post & community notification modes#39
Merged
Conversation
Lemmy v1 lets users set per-post and per-community notification levels
("all activity" / "replies and mentions" / "mute", with an extra "all
posts" tier on communities). This surfaces them in threadiverse and
enables the `subscribed` notification kind in the normalized inbox.
- `PostNotificationsMode` and `CommunityNotificationsMode` schemas; the
current mode is exposed as `notifications` on `PostView` /
`CommunityView` (v1 reads from `PostActions` / `CommunityActions`;
v0 and PieFed default to `replies_and_mentions`).
- `editPostNotifications` / `editCommunityNotifications` on
`BaseClient`. v1 delegates to lemmy-js-client; v0 and PieFed throw
`UnsupportedError` so consumers can hide the UI.
- Render `subscribed` notifications for v1 (post + comment data
variants). Previously dropped silently from the normalized inbox.
3010652 to
e481b6d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
all_comments/replies_and_mentions/mutefor posts; same plusall_posts_and_comments/all_postsfor communities). Surface them onPostView/CommunityViewasnotifications, and addeditPostNotifications/editCommunityNotificationstoBaseClient.UnsupportedErrorand defaultnotificationstoreplies_and_mentionsso consumers can detect the capability and hide the UI.subscribednotification kind for v1 intoSupportedNotificationView(both post and comment data variants). Previously these were dropped silently — consumers like Voyager had to patch around it.Test plan
pnpm lintpnpm test:typespnpm test(existing 23 tests pass)voyager.lemmy.ml