sdk: fix for invalid npub in InputToProfile()
This commit is contained in:
@@ -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)}
|
||||
|
||||
Reference in New Issue
Block a user