You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

25 lines
775 B

import { ExtendedKind, SUPPORTED_KINDS } from '@/constants'
import { kinds } from 'nostr-tools'
/** Kinds the main `Note` component renders with a dedicated UI (not `UnknownNote`). */
const RENDERABLE_NOTE_KINDS = new Set<number>([
...SUPPORTED_KINDS,
kinds.Reaction,
ExtendedKind.POLL_RESPONSE,
kinds.CommunityDefinition,
kinds.LiveEvent,
ExtendedKind.GROUP_METADATA,
ExtendedKind.PUBLIC_MESSAGE,
ExtendedKind.ZAP_REQUEST,
ExtendedKind.ZAP_RECEIPT,
ExtendedKind.PUBLICATION_CONTENT,
ExtendedKind.FOLLOW_PACK,
ExtendedKind.CITATION_INTERNAL,
ExtendedKind.CITATION_EXTERNAL,
ExtendedKind.CITATION_HARDCOPY,
ExtendedKind.CITATION_PROMPT
])
export function isRenderableNoteKind(kind: number): boolean {
return RENDERABLE_NOTE_KINDS.has(kind)
}