feat: kind filter

This commit is contained in:
codytseng
2025-08-23 22:23:35 +08:00
parent f3f72e2f28
commit 4b9ead8319
13 changed files with 607 additions and 72 deletions

View File

@@ -1,3 +1,5 @@
import { kinds } from 'nostr-tools'
export const JUMBLE_API_BASE_URL = 'https://api.jumble.social'
export const DEFAULT_FAVORITE_RELAYS = [
@@ -36,6 +38,7 @@ export const StorageKey = {
HIDE_UNTRUSTED_NOTES: 'hideUntrustedNotes',
DEFAULT_SHOW_NSFW: 'defaultShowNsfw',
DISMISSED_TOO_MANY_RELAYS_ALERT: 'dismissedTooManyRelaysAlert',
SHOW_KINDS: 'showKinds',
MEDIA_UPLOAD_SERVICE: 'mediaUploadService', // deprecated
HIDE_UNTRUSTED_EVENTS: 'hideUntrustedEvents', // deprecated
ACCOUNT_RELAY_LIST_EVENT_MAP: 'accountRelayListEventMap', // deprecated
@@ -74,6 +77,18 @@ export const ExtendedKind = {
GROUP_METADATA: 39000
}
export const DEFAULT_SHOW_KINDS = [
kinds.ShortTextNote,
kinds.Repost,
ExtendedKind.PICTURE,
ExtendedKind.POLL,
ExtendedKind.COMMENT,
ExtendedKind.VOICE,
ExtendedKind.VOICE_COMMENT,
kinds.Highlights,
kinds.LongFormArticle
]
export const URL_REGEX =
/https?:\/\/[\w\p{L}\p{N}\p{M}&.-/?=#\-@%+_:!~*]+(?<![.,;:'")\]}!?""''])/gu
export const WS_URL_REGEX =