mirror of
https://github.com/fiatjaf/nak.git
synced 2026-07-30 19:36:15 +00:00
Merge pull request #172 from mattn/fix/parse-event-id-note1
helpers: fix parseEventID rejecting note1 codes
This commit is contained in:
+2
-2
@@ -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