helpers: fix parseEventID rejecting note1 codes, nip19.Decode returns an EventPointer for those.

This commit is contained in:
Yasuhiro Matsumoto
2026-07-15 03:13:44 +09:00
parent 51f79e1d3c
commit d8e951e881

View File

@@ -507,8 +507,8 @@ func parseEventID(value string) (nostr.ID, error) {
if prefix, decoded, err := nip19.Decode(value); err == nil {
switch prefix {
case "note":
if id, ok := decoded.(nostr.ID); ok {
return id, nil
if event, ok := decoded.(nostr.EventPointer); ok {
return event.ID, nil
}
case "nevent":
if event, ok := decoded.(nostr.EventPointer); ok {