Pointer cannot hold a pointer so it can't be a hidden nil.
This commit is contained in:
@@ -14,20 +14,10 @@ func EncodePointer(pointer nostr.Pointer) string {
|
||||
} else {
|
||||
return EncodeNprofile(v.PublicKey, v.Relays)
|
||||
}
|
||||
case *nostr.ProfilePointer:
|
||||
if v.Relays == nil {
|
||||
return EncodeNpub(v.PublicKey)
|
||||
} else {
|
||||
return EncodeNprofile(v.PublicKey, v.Relays)
|
||||
}
|
||||
case nostr.EventPointer:
|
||||
return EncodeNevent(v.ID, v.Relays, v.Author)
|
||||
case *nostr.EventPointer:
|
||||
return EncodeNevent(v.ID, v.Relays, v.Author)
|
||||
case nostr.EntityPointer:
|
||||
return EncodeNaddr(v.PublicKey, v.Kind, v.Identifier, v.Relays)
|
||||
case *nostr.EntityPointer:
|
||||
return EncodeNaddr(v.PublicKey, v.Kind, v.Identifier, v.Relays)
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user