feat: highlight (#346)
This commit is contained in:
parent
ef0dc9e923
commit
6c91ba9eff
8 changed files with 197 additions and 29 deletions
|
|
@ -60,7 +60,7 @@ export function isProtectedEvent(event: Event) {
|
|||
}
|
||||
|
||||
export function isSupportedKind(kind: number) {
|
||||
return [kinds.ShortTextNote, ExtendedKind.PICTURE].includes(kind)
|
||||
return [kinds.ShortTextNote, kinds.Highlights, ExtendedKind.PICTURE].includes(kind)
|
||||
}
|
||||
|
||||
export function getParentEventTag(event?: Event) {
|
||||
|
|
@ -524,3 +524,16 @@ export function extractEmojiInfosFromTags(tags: string[][] = []) {
|
|||
})
|
||||
.filter(Boolean) as TEmoji[]
|
||||
}
|
||||
|
||||
export function createFakeEvent(event: Partial<Event>): Event {
|
||||
return {
|
||||
id: '',
|
||||
kind: 1,
|
||||
pubkey: '',
|
||||
content: '',
|
||||
created_at: 0,
|
||||
tags: [],
|
||||
sig: '',
|
||||
...event
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue