Skip to content

feat: apply web of trust filter to thread replies#583

Merged
barrydeen merged 2 commits into
mainfrom
feat/wot-filter-threads
Jun 5, 2026
Merged

feat: apply web of trust filter to thread replies#583
barrydeen merged 2 commits into
mainfrom
feat/wot-filter-threads

Conversation

@barrydeen
Copy link
Copy Markdown
Owner

Summary

  • WoT filter already silently drops events at EventRepository.addEvent and inside NotificationRepository, but thread replies bypassed both paths — ThreadViewModel keeps its own threadEvents map seeded via cacheEvent() and getCachedThreadEvents(), neither of which checks WoT
  • Apply isWotFiltered inside rebuildTree() alongside the existing block / mute / spam filters
  • Root note stays visible (user explicitly navigated to it); replies from authors outside the qualified network are silently dropped, matching feed + notifications behavior
  • isWotFiltered changed from private to package-default so ThreadViewModel can reuse the same logic instead of duplicating it
  • WOT_EXEMPT_KINDS already excludes the relevant infrastructure kinds (0/3/4/10002/10050/1059/13/14); kind 1 replies are not exempt, which is what we want

Test plan

  • With WoT disabled: open a thread with replies — all replies render as before
  • With WoT enabled and graph computed: open a thread containing replies from accounts outside your qualified network — those replies are hidden; replies from follows and qualified second-degree accounts remain
  • Open a thread whose root author is outside your network — root still renders (you tapped in deliberately)
  • With WoT enabled but graph not yet computed: replies are not filtered (isNetworkReady returns false) — falls open, no regression
  • Confirm own replies in a thread are never filtered (currentUserPubkey carve-out in isWotFiltered)

barrydeen added 2 commits June 5, 2026 17:09
The WoT filter was already silently dropping events at EventRepository
ingestion and in NotificationRepository, but thread replies bypassed
both paths — ThreadViewModel keeps its own threadEvents map seeded via
cacheEvent() and getCachedThreadEvents(), neither of which checks WoT.

Apply isWotFiltered in rebuildTree() alongside the existing block /
mute / spam filters. The root note is always shown (user explicitly
navigated to it); replies from authors outside the qualified network
are silently dropped, matching how WoT behaves in the feed and
notifications.
@barrydeen barrydeen merged commit fa82ac2 into main Jun 5, 2026
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