Skip to content

Drop retweets when the original author blocked the viewer - #100

Open
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:fix/block-retweeted-author
Open

Drop retweets when the original author blocked the viewer#100
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:fix/block-retweeted-author

Conversation

@Pitchfork-and-Torch

Copy link
Copy Markdown

Bug

BlockedByHydrator only asked socialgraph whether candidate.author_id blocked the viewer. AuthorSocialgraphFilter then drops on author_blocks_viewer.

A retweet of an author who blocked the viewer still served: the retweeter is author_id, the original is retweeted_user_id. Viewer blocking the original is already handled via blocked_user_ids (block-on-retweet). The reverse direction was missing on For You.

Following already checks retweeted_user_id in FollowingBlockedByHydrator. Quote authors are a different field (quoted_author_blocks_viewer via QuoteHydrator). This is not mute-on-retweet (PR 9).

Fix

Include retweeted_user_id in check_blocked_by. Set author_blocks_viewer if either the primary author or the original retweeted author blocked the viewer. Same field Following already uses.

BlockedByHydrator is skipped for cached posts. Cache payloads from before this change can still miss until TTL.

Proof

  • Entry: BlockedByHydrator check_blocked_by
  • Sink: AuthorSocialgraphFilter author_blocks_viewer
  • Break: For You never passed retweeted_user_id into blocked-by
  • Viewer effect: user blocked by A still sees B retweet A
  • Twin: FollowingBlockedByHydrator retweeted_user_id

Tests

  • retweet_of_author_who_blocked_viewer_is_marked
  • primary_author_who_blocked_viewer_is_still_marked
  • unit tests added; cargo test cannot run in the public dump

BlockedByHydrator only checked candidate.author_id. A retweet of an
author who blocked the viewer still served. Following already checks
retweeted_user_id. Include that id in check_blocked_by and set
author_blocks_viewer if either user blocked the viewer.
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