mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-08-31 17:58:15 +02:00
Pointer cannot hold a pointer so it can't be a hidden nil.
This commit is contained in:
@@ -16,26 +16,12 @@ func EncodePointer(pointer nostr.Pointer) string {
|
||||
res, _ := EncodeProfile(v.PublicKey, v.Relays)
|
||||
return res
|
||||
}
|
||||
case *nostr.ProfilePointer:
|
||||
if v.Relays == nil {
|
||||
res, _ := EncodePublicKey(v.PublicKey)
|
||||
return res
|
||||
} else {
|
||||
res, _ := EncodeProfile(v.PublicKey, v.Relays)
|
||||
return res
|
||||
}
|
||||
case nostr.EventPointer:
|
||||
res, _ := EncodeEvent(v.ID, v.Relays, v.Author)
|
||||
return res
|
||||
case *nostr.EventPointer:
|
||||
res, _ := EncodeEvent(v.ID, v.Relays, v.Author)
|
||||
return res
|
||||
case nostr.EntityPointer:
|
||||
res, _ := EncodeEntity(v.PublicKey, v.Kind, v.Identifier, v.Relays)
|
||||
return res
|
||||
case *nostr.EntityPointer:
|
||||
res, _ := EncodeEntity(v.PublicKey, v.Kind, v.Identifier, v.Relays)
|
||||
return res
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
Reference in New Issue
Block a user