mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-03 19:35:28 +00:00
Add hashtag preference schema and feature flag
This commit is contained in:
1 parent
3d1a615ed3
commit
372cb8ca6f
3 files changed
+78
No files matched your search
@@ -147,6 +147,7 @@ import { updateWatchHistoryListWithDefaultClient } from "./nostrWatchHistoryFaca
|
||||
| Watch history chunk (`NOTE_TYPES.WATCH_HISTORY_CHUNK`) | `WATCH_HISTORY_KIND` (default `30079`, clients also read legacy `30078`) | `['d', <snapshotId:index>]`, `['encrypted','nip04']`, `['snapshot', <id>]`, `['chunk', <index>, <total>]`, optional leading `['head','1']` on the first chunk, pointer tags for each item, plus schema append tags | NIP-04 encrypted JSON chunk (`{ version, snapshot, chunkIndex, totalChunks, items[] }`) |
|
||||
| Subscription list (`NOTE_TYPES.SUBSCRIPTION_LIST`) | `30002` | `['d', 'subscriptions']` | NIP-04 encrypted JSON `{ subPubkeys: string[] }` |
|
||||
| User block list (`NOTE_TYPES.USER_BLOCK_LIST`) | `30002` | `['d', 'user-blocks']` | NIP-04 encrypted JSON `{ blockedPubkeys: string[] }` |
|
||||
| Hashtag preferences (`NOTE_TYPES.HASHTAG_PREFERENCES`) | `30005` | `['d', 'bitvid:tag-preferences']` plus schema-appended `['encrypted','nip44_v2']` | NIP-44 encrypted JSON `{ version, interests: string[], disinterests: string[] }` |
|
||||
| Admin moderation list (`NOTE_TYPES.ADMIN_MODERATION_LIST`) | `30000` | `['d', 'bitvid:admin:editors']`, repeated `['p', <pubkey>]` entries | Empty content |
|
||||
| Admin blacklist (`NOTE_TYPES.ADMIN_BLACKLIST`) | `30000` | `['d', 'bitvid:admin:blacklist']`, repeated `['p', <pubkey>]` entries | Empty content |
|
||||
| Admin whitelist (`NOTE_TYPES.ADMIN_WHITELIST`) | `30000` | `['d', 'bitvid:admin:whitelist']`, repeated `['p', <pubkey>]` entries | Empty content |
|
||||
@@ -157,6 +158,17 @@ If you introduce a new Nostr feature, add its schema to
|
||||
`js/nostrEventSchemas.js` so that the catalogue stays complete and so existing
|
||||
builders inherit the same debugging knobs.
|
||||
|
||||
### Hashtag preference lists
|
||||
|
||||
Hashtag preference events (`NOTE_TYPES.HASHTAG_PREFERENCES`) live on a
|
||||
replaceable `30005` list with a stable identifier tag of
|
||||
`['d','bitvid:tag-preferences']`. The builder appends `['encrypted','nip44_v2']`
|
||||
so downstream clients can detect that the payload is encrypted. The `content`
|
||||
field must be a NIP-44 ciphertext representing the JSON shape
|
||||
`{ version, interests: string[], disinterests: string[] }`, allowing clients to
|
||||
share their preferred and muted hashtags without exposing the raw preferences on
|
||||
relays.
|
||||
|
||||
### 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