Skip to content

feat(lemmyv1): post & community notification modes#39

Merged
aeharding merged 1 commit into
mainfrom
feat/lemmyv1-notification-modes
May 25, 2026
Merged

feat(lemmyv1): post & community notification modes#39
aeharding merged 1 commit into
mainfrom
feat/lemmyv1-notification-modes

Conversation

@aeharding
Copy link
Copy Markdown
Owner

Summary

  • Lemmy v1 introduced per-post and per-community notification levels (all_comments/replies_and_mentions/mute for posts; same plus all_posts_and_comments/all_posts for communities). Surface them on PostView/CommunityView as notifications, and add editPostNotifications/editCommunityNotifications to BaseClient.
  • v0 and PieFed throw UnsupportedError and default notifications to replies_and_mentions so consumers can detect the capability and hide the UI.
  • Render subscribed notification kind for v1 in toSupportedNotificationView (both post and comment data variants). Previously these were dropped silently — consumers like Voyager had to patch around it.

Test plan

  • pnpm lint
  • pnpm test:types
  • pnpm test (existing 23 tests pass)
  • Consumer (Voyager) wires up the new methods and exercises against voyager.lemmy.ml

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.
@aeharding aeharding force-pushed the feat/lemmyv1-notification-modes branch from 3010652 to e481b6d Compare May 25, 2026 19:30
@aeharding aeharding merged commit dd50244 into main May 25, 2026
1 check passed
@aeharding aeharding deleted the feat/lemmyv1-notification-modes branch May 25, 2026 19:32
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.

1 participant