mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 00:28:51 +00:00
Improve event types
This commit is contained in:
6
nip25.ts
6
nip25.ts
@@ -17,9 +17,9 @@ export type ReactionEventTemplate = {
|
||||
|
||||
export function finishReactionEvent(
|
||||
t: ReactionEventTemplate,
|
||||
reacted: Event,
|
||||
reacted: Event<number>,
|
||||
privateKey: string,
|
||||
): Event {
|
||||
): Event<Kind.Reaction> {
|
||||
const inheritedTags = reacted.tags.filter(
|
||||
(tag) => tag.length >= 2 && (tag[0] === 'e' || tag[0] === 'p'),
|
||||
)
|
||||
@@ -37,7 +37,7 @@ export function finishReactionEvent(
|
||||
}, privateKey)
|
||||
}
|
||||
|
||||
export function getReactedEventPointer(event: Event): undefined | EventPointer {
|
||||
export function getReactedEventPointer(event: Event<number>): undefined | EventPointer {
|
||||
if (event.kind !== Kind.Reaction) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user