Skip to content

fix(mute): reposts of muted threads + false "reposted your note" label#21

Merged
DocNR merged 1 commit into
mainfrom
fix/repost-mute-bypass-and-label
Jun 17, 2026
Merged

fix(mute): reposts of muted threads + false "reposted your note" label#21
DocNR merged 1 commit into
mainfrom
fix/repost-mute-bypass-and-label

Conversation

@DocNR

@DocNR DocNR commented Jun 17, 2026

Copy link
Copy Markdown
Owner

What

Fixes two bugs that collided on one event: a kind-6 repost of a muted "hellthread" whose reposter copied the thread's entire 362-entry p-tag list, so the repost tagged (and notified) a user who only ever appeared in that tag list.

Reported symptom: a Notifications entry reading "DanWedge reposted your note" for a note the user neither authored nor wanted — one they had explicitly muted.

Bug 1 — reposts bypass thread-mute

isInMutedThread() treated a repost as opaque. getThreadRootId only understands kind-1 threads, so for a kind-6/16 wrapper it returned the repost's own id and never looked at the reposted note. A repost of a muted note/thread slipped into feeds, notifications, and the unread counts that route through the same filter.

Now isInMutedThread unwraps the reposted target (embedded JSON in content, else the e-tag id) and checks its id and computed root against the mute set. Quote-posts (kind 1) are unaffected — the existing "quotes aren't muted" behavior stays.

Bug 2 — false "your note" attribution

RepostNotification hardcoded t('reposted your note') for every repost that tagged you. Now it shows "reposted your note" only when the reposted note's author is the viewer, otherwise "reposted a note" (new en.ts key).

Also

  • Defense-in-depth isInMutedThread check on the async-fetched target in RepostNoteCard (covers a no-embedded-JSON repost of a reply inside a muted thread).

Tests

  • 5 new cases in event.spec.ts: kind-6 repost of muted root (embedded JSON), repost of a reply in the muted thread, e-tag-only (no content), kind-16 generic repost, and a repost of an unmuted note (stays visible).
  • Full suite: 903 passed / 1 skipped. npm run build green.

Notes

  • Version bumped 26.15.3 → 26.15.4 + "What's new" entry.
  • en.ts kept to a single added key (avoided the prettier-skew churn on main).

🤖 Generated with Claude Code

…label

Two bugs surfaced by a kind-6 repost of a muted hellthread that copied the
thread's whole p-tag list (so it tagged, and notified, a user who is neither
the author nor a participant beyond being tagged):

1. Mute bypass. isInMutedThread() treated a repost as opaque: getThreadRootId
   only understands kind-1 threads, so for a kind-6/16 wrapper it returned the
   repost's own id and never checked the reposted note. A repost of a muted
   note/thread slipped into both feeds and notifications (and the unread
   counts that route through the same filter). Now isInMutedThread unwraps the
   reposted target (embedded JSON, else the e-tag id) and checks its id + root.

2. False attribution. RepostNotification hardcoded "reposted your note" for
   every repost that tagged you. Now it says "reposted your note" only when the
   reposted note's author is the viewer, else "reposted a note".

Also adds a defense-in-depth isInMutedThread check on the async-fetched target
in RepostNoteCard (covers a no-embedded-JSON repost of a reply in a muted
thread). New en.ts key 'reposted a note'. Tests cover kind-6/16 reposts via
embedded JSON and e-tag-only forms.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying jank with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5a719de
Status: ✅  Deploy successful!
Preview URL: https://6dc6670c.jank-4ii.pages.dev
Branch Preview URL: https://fix-repost-mute-bypass-and-l.jank-4ii.pages.dev

View logs

@DocNR DocNR merged commit 601e135 into main Jun 17, 2026
2 checks passed
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