Repository navigation
feat(api): report or block huddl organizers and group owners - #707
Merged
Merged
Conversation
mwoods79
added a commit
to huddlz-hq/huddlz-ios
that referenced
this pull request
Nov 25, 2026
* Report or block a huddl's organizer or a group's owner, and unblock from your account The huddl page and the group page get a More menu. A huddl offers Report organizer and Block organizer. A group offers Report group and Block group owner, so a group with no upcoming huddlz can still be reported or blocked. Visitors are asked to sign in first, and the menu stays hidden on a huddl you organize or a group you own. Reports take a reason and optional details, as on the web. Blocking hides that person's huddlz from search and group pages right away, and the account sheet lists blocked people with an Unblock button. Signed-in searches and group pages now send the session so the server can leave out blocked organizers; an expired session falls back to browsing as a visitor. Discover waits for the saved session check so it searches once, as the right person. The endpoints come from huddlz-hq/huddlz#707, which must deploy first. * Clear session state on viewer change, supersede block refreshes, and enforce no-redirect policy - Clear Discover results, cursor, and bearer token immediately whenever the viewer changes, and let moderation refreshes supersede in-flight searches or refreshes. - Track group detail revision and viewer across both group and huddlz requests, clearing private groups on sign-out. - Move huddl detail loading into HuddlDetailStore using the current viewer's session and clearing on viewer change. - Share AccountRedirectPolicy with DiscoveryClient so bearer tokens never follow redirects. - Hide the moderation menu for signed-in members until ownership finishes loading, and allow 60s for Keychain save in ModerationUITests. * Drop pre-block cards on block revision, keep cached group pagination, and clear ownership on recheck - Re-search Discover on blockRevision changes so a failed post-block request never leaves blocked cards or a stale pagination cursor on screen. - Return early on GroupDetailStore cache hits before advancing revision so in-flight loadMore calls complete cleanly. - Clear checkedUserID at the start of ModerationStore.checkOwnership so confirmed owners never flash the moderation menu on a repeat check. - Exercise DiscoveryClient's no-redirect policy through a local loopback HTTP server in ModerationBehaviorTests. * Keep public huddl details mounted during visitor sign-in and transient reloads - Clear HuddlDetailStore.huddl up front only when leaving a signed-in session, keeping public details mounted during visitor-to-member sign-in so the RSVP sign-up sheet completes the home-city step. - Keep a loaded huddl on screen on transient reload errors unless the server returns 404. * Preserve authorization failure through visitor retry so revoked huddl details clear - Distinguish DiscoveryError.forbidden on 403 and on a failed visitor retry after 401 while keeping the same user-facing message. - Clear cached huddl details in HuddlDetailStore on 403, 404, or a failed post-401 retry, while still keeping loaded details on ordinary 503 reloads. * Isolate scroll visibility and pagination trigger from DiscoveryView body
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
Evidence
After: Generated
20261125033612_add_user_blocks.exsmigration anduser_blockssnapshot (mix ash.codegen --checkandmix format --check-formattedpass locally); Cucumber scenarios inhuddl_organizer_moderation.featurecover reporting, blocking, unblocking, block privacy, self-block refusal, group reporting/blocking on empty public groups, andorganized_by_me/owned_by_me.Merge Danger
Door: two-way
Adds a new
user_blockstable and new JSON:API routes plus read-time filtering on huddl queries. Easy to revert if unused; once users create blocks, dropping the table would lose those blocks.Blast Radius: low
Read filtering (
HideBlockedOrganizers) runs onupcoming,search, andby_groupqueries only when an actor is present and only hides huddlz from accounts that actor explicitly blocked.