From 05c8b1a486da1cb521e3463d63b728136480d09e Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Wed, 12 Nov 2025 20:15:55 -0500 Subject: [PATCH] Update hashtag preference kind --- js/nostrEventSchemas.js | 4 ++-- js/services/hashtagPreferencesService.js | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/js/nostrEventSchemas.js b/js/nostrEventSchemas.js index dfd2fbaf..d4926454 100644 --- a/js/nostrEventSchemas.js +++ b/js/nostrEventSchemas.js @@ -421,7 +421,7 @@ const BASE_SCHEMAS = { [NOTE_TYPES.HASHTAG_PREFERENCES]: { type: NOTE_TYPES.HASHTAG_PREFERENCES, label: "Hashtag preferences", - kind: 30005, + kind: 30015, identifierTag: { name: "d", value: "bitvid:tag-preferences", @@ -1555,7 +1555,7 @@ export function buildHashtagPreferenceEvent({ } appendSchemaTags(tags, schema); return { - kind: schema?.kind ?? 30005, + kind: schema?.kind ?? 30015, pubkey, created_at, tags, diff --git a/js/services/hashtagPreferencesService.js b/js/services/hashtagPreferencesService.js index 6cf488d3..2dd34c88 100644 --- a/js/services/hashtagPreferencesService.js +++ b/js/services/hashtagPreferencesService.js @@ -4,7 +4,11 @@ import { requestDefaultExtensionPermissions, } from "../nostrClientFacade.js"; import { getActiveSigner } from "../nostr/index.js"; -import { buildHashtagPreferenceEvent } from "../nostrEventSchemas.js"; +import { + buildHashtagPreferenceEvent, + getNostrEventSchema, + NOTE_TYPES, +} from "../nostrEventSchemas.js"; import { publishEventToRelays, assertAnyRelayAccepted, @@ -331,8 +335,9 @@ class HashtagPreferencesService { return; } + const schema = getNostrEventSchema(NOTE_TYPES.HASHTAG_PREFERENCES); const filter = { - kinds: [30005], + kinds: [schema?.kind ?? 30015], authors: [normalized], "#d": [HASHTAG_IDENTIFIER], limit: 50,