mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 12:52:26 +00:00
Document hashtag preferences and extend tests
This commit is contained in:
1 parent
1aa9eec6d1
commit
f4744cb921
6 files changed
+156
No files matched your search
@@ -75,6 +75,12 @@ New operators should also note that fresh viewer accounts automatically inherit
|
||||
|
||||
The profile modal now exposes blur, autoplay, and hide thresholds so operators can dial in stricter or more permissive behavior. Enter a non-negative whole number to override the default or leave the field blank to fall back to the baseline values from [`config/instance-config.js`](../../config/instance-config.js) (`DEFAULT_BLUR_THRESHOLD`, `DEFAULT_AUTOPLAY_BLOCK_THRESHOLD`, `DEFAULT_TRUSTED_MUTE_HIDE_THRESHOLD`, `DEFAULT_TRUSTED_SPAM_HIDE_THRESHOLD`). Adjustments are stored locally, applied immediately to the active feed, and rehydrate on every load. Update the config file to change the per-instance defaults that new viewers see.
|
||||
|
||||
### Personal hashtag preferences
|
||||
|
||||
- The Profile modal’s Hashtags tab is wired to [`HashtagPreferencesService`](../../js/services/hashtagPreferencesService.js), which maintains a local snapshot of the viewer’s interests and disinterests, normalizes every tag, and guarantees that the two sets stay mutually exclusive before broadcasting UI change events.【F:js/services/hashtagPreferencesService.js†L206-L276】【F:js/services/hashtagPreferencesService.js†L304-L324】
|
||||
- `bitvidApp` resolves the active pubkey’s preferences at login, listens for `CHANGE` events, and forwards the normalized snapshot to controllers so moderation and discovery logic can react without querying relays again.【F:js/app.js†L3811-L3906】【F:js/app.js†L3940-L4050】
|
||||
- Publishing writes a replaceable `kind 30005` list with `d=bitvid:tag-preferences`, encrypting the `{ version, interests, disinterests }` payload via the best available NIP-44/NIP-04 scheme before hitting every configured write relay.【F:docs/nostr-event-schemas.md†L150-L168】【F:js/services/hashtagPreferencesService.js†L520-L711】
|
||||
|
||||
### Runtime flags
|
||||
|
||||
- `TRUSTED_MUTE_HIDE_THRESHOLD` — numeric default for the trusted mute hide control. Initialized from `DEFAULT_TRUSTED_MUTE_HIDE_THRESHOLD` in [`config/instance-config.js`](../../config/instance-config.js); the upstream config sets this to `1`, but adjust the export to match your policy.
|
||||
|
||||
@@ -169,6 +169,13 @@ field must be a NIP-44 ciphertext representing the JSON shape
|
||||
share their preferred and muted hashtags without exposing the raw preferences on
|
||||
relays.
|
||||
|
||||
When decrypting, the client inspects both `['encrypted', ...]` and
|
||||
`['encryption', ...]` hints on the event to prioritize NIP-44 v2 payloads,
|
||||
falling back to legacy NIP-44 or NIP-04 decryptors when required. Publishing
|
||||
performs the same capability probe, updating the existing `encrypted` tag with
|
||||
the negotiated scheme before signing so other readers know which cipher to try
|
||||
first.【F:js/services/hashtagPreferencesService.js†L356-L511】【F:js/services/hashtagPreferencesService.js†L520-L657】
|
||||
|
||||
### NIP-71 rollout
|
||||
|
||||
bitvid now emits a paired NIP-71 event (kind `21` for long-form, `22` for short
|
||||
|
||||
Reference in new issue
Block a user