Conversation
- New lemmyv1 adapter with full v4 API support: RequestState unwrapping, paged responses (.items), unified getNotifications + markNotificationAsRead, search via search_term, resolveObject discriminated union, getSite + getMyUser parallel fetch with toMyUserInfo conversion. - Flat ModlogItem shape (replaces 15 typed views). v0 adapter upconverts. ModlogKind enum now lowercase/snake_case. - Provider-typed error hierarchy: ResponseError -> LemmyResponseError / PiefedResponseError, with .code/.status/.cause. Errors are only wrapped when the server returned an error response; transport failures pass through as their native types. - Lowercase/snake_case enums: ListingType, SearchType, CommunityVisibility, RegistrationMode, FederationMode, ModlogKind. - Removed 6 dead methods (getReplies/getPersonMentions/getPrivateMessages and the 3 mark-as-read variants) from BaseClient + forwarders. v0/piefed now route through getNotifications + markNotificationAsRead. - Support nightly version strings (e.g. nightly-2026-05-21) in version satisfaction check. - Drop PrivateMessage.read from schema (v1 reads come from notification.read). - Add mod_warn_post, mod_warn_comment, mod_lock_comment to ModlogKind. - New PiefedResponseError gains cause field via ES2022 Error.cause.
Promotes Lemmy v1 to the source of truth for shared schemas (aggregates flattened, NotificationView extended with mod_action, vote payload shape change to is_upvote) and updates v0/PieFed compat layers to upconvert into the new shape. Fixes a slew of bugs surfaced during live testing against voyager.lemmy.ml: null-wire handling for optional fields, vote-payload field rename, over-eager error wrapping, and mod-action notifications being silently dropped.
# Conflicts: # src/BaseClient.ts # src/errors.ts # src/providers/lemmyv0/compat.ts # src/providers/piefed/compat.ts # src/providers/piefed/index.ts
Threadiverse moved to snake_case enums for v1 alignment, but the PieFed server still expects PascalCase (`All`, `Subscribed`, ...). `getComments`, `listCommunities`, and `search` were forwarding snake_case values and getting `400 Validation failed` back. Convert via `fromListingType` / `fromSearchType` at the boundary. Also drops stale commented-out helpers from lemmyv1/helpers.ts.
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
lemmy-js-client-v1to1.0.0-image-uploads-request.0and adapts the V1 provider to the new wire shape (RequestState wrapping, paged.items, flattened modlog, separated search result arrays,MyUserInforestructure, etc.)is_upvote: boolean,NotificationViewgains amod_actionbranch. V0 and PieFed compat layers upconvert into the new shapes.voyager.lemmy.ml:normalizeErrorwas wrapping transport errors (TypeError/AbortError) asLemmyResponseErrormod_actionnotifications were being filtered out, inflating the unread badgeq→search_term)cleanThreadiverseParamsmode-leak fix moved into compat layersTest plan
pnpm test:typespassespnpm testpasses (19 tests)voyager.lemmy.ml(Lemmy 1.0 beta) via Voyager: post feed, comments, vote/save, modlog, inbox (mentions/replies/PMs/mod actions), search, profile filters