diff --git a/sdk/input.go b/sdk/input.go index d9ffbdc..d847c1c 100644 --- a/sdk/input.go +++ b/sdk/input.go @@ -16,7 +16,11 @@ func InputToProfile(ctx context.Context, input string) *nostr.ProfilePointer { } // handle nip19 codes, if that's the case - prefix, data, _ := nip19.Decode(input) + prefix, data, err := nip19.Decode(input) + if err != nil { + return nil + } + switch prefix { case "npub": return &nostr.ProfilePointer{PublicKey: data.(nostr.PubKey)}