Files
bitvid/tests
thePR0M3TH3ANandClaude Opus 4.8 e20191d6bc feat(nip71): Phase 1a — mirror publish service with site NSFW gate
Publish service for the opt-in NIP-71 mirror (kind 34235/36) to the user's
write/outbox relays, built on the Phase 0 builder. Flag still off; not yet wired
into the publish path (next increment).

- js/services/nip71MirrorService.js: createNip71MirrorService (DI) → isAvailable,
  canMirror(video), publish(video, options). Signs with the active signer and
  publishes to the write set (getDeletePublishRelays). Resolves the moderation
  audit item: the site ALLOW_NSFW_CONTENT gate — an instance that won't surface
  NSFW must not publish it outward (enforced in both publish() and canMirror(),
  defense-in-depth). Private/url rules come from the builder.

tests/nip71-mirror-service.test.mjs: publishes a public video; NSFW blocked when
ALLOW_NSFW_CONTENT=false (and allowed when true); private/url-less refused;
unavailable without signer. Mutation-verified (NSFW gate load-bearing).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-22 09:03:41 -04:00
..
2026-02-21 16:08:33 -05:00
2026-02-21 15:53:09 -05:00