Skip to content

Drop replies whose conversation ancestors blocked the viewer - #111

Open
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:fix/ancestor-author-blocks-viewer
Open

Drop replies whose conversation ancestors blocked the viewer#111
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:fix/ancestor-author-blocks-viewer

Conversation

@Pitchfork-and-Torch

Copy link
Copy Markdown

Bug

AuthorSocialgraphFilter drops on author_blocks_viewer. FollowingBlockedByHydrator only asked quoted_user_id and retweeted_user_id. BlockedByHydrator only asked author_id.

Conversation modules render ancestor tweets from ancestor_users (parent plus root). PR 101 is viewer mute/block of those ids (filter-only, no RPC). The reverse edge was missing: an ancestor who blocked the viewer never reached check_blocked_by, so author_blocks_viewer stayed false and the reply still served.

This is not mute-on-ancestor (PR 101), not native Following author_id (PR 108), and not Phoenix retweet original (PR 100).

Fix

Include ancestor_users in check_blocked_by. Set author_blocks_viewer if any ancestor blocked the viewer (Following also keeps the retweeted_user_id edge; Phoenix keeps the primary author_id edge).

Proof

  • Entry: FollowingBlockedByHydrator / BlockedByHydrator check_blocked_by
  • Sink: AuthorSocialgraphFilter author_blocks_viewer
  • Break: neither hydrator passed ancestor_users
  • Viewer effect: F replies to Q; Q blocked the viewer; Home still shows Q in the conversation module
  • Twin: PR 101 viewer mute/block of ancestor_users; Brazil ancestor_users drop

Tests

  • ancestor_who_blocked_viewer_is_marked (Following and Phoenix; fails on unmodified main)
  • retweet_of_author_who_blocked_viewer_is_still_marked
  • primary_author_who_blocked_viewer_is_still_marked
  • unit tests added; cargo test cannot run in the public dump

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