mirror of
https://github.com/fiatjaf/nak.git
synced 2026-07-27 23:07:39 +02:00
helpers: fix parseEventID rejecting note1 codes, nip19.Decode returns an EventPointer for those.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user