mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-29 08:52:25 +00:00
Pulls NIP-71 video events published by other Nostr apps (kinds 21/22/34235/34236), converts them via the ingest adapter, and injects them into nostrClient.activeMap/allEvents so they flow through the existing feed pipeline. Gated by FEATURE_NIP71_INGEST. Mirrors bitvid's whitelist model: since the whitelist is "authors allowed to publish/render here," ingest scopes its relay subscription to whitelisted pubkeys while whitelist mode is on (bounded, no firehose) and re-subscribes when the whitelist changes. When a deployer disables whitelist mode, ingest opens to all authors (capped by a limit). Foreign content is still gated by the same render-time filter (shouldIncludeVideo -> accessControl.canAccess): whitelist, blacklist, NSFW (content-warning -> isNsfw), private-skip, plus trust/mute/blur from the feed engine. Native bitvid videos always win a shared root; among ingested videos newest wins. Refreshes via the existing videos:updated reactive path. - accessControl.getWhitelistPubkeys(): hex whitelist for subscription scope. - Wired in applicationBootstrap (start on init, stop on teardown). - nostrService untouched (at its size cap); logic is a standalone service. Mutation-verified: native-wins, whitelist scoping, feature gate. Co-Authored-By: Claude Opus 4.8 <[email protected]>