mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-11-18 10:06:27 +01:00
breaking pointer mess
- ExternalPointer (?) - nip27, nip22 and nip10 functions to return pointers - get rid of sdk/thread helpers that were just a thin layer over nip10 and nip22
This commit is contained in:
@@ -9,8 +9,13 @@ import (
|
||||
func EncodePointer(pointer nostr.Pointer) string {
|
||||
switch v := pointer.(type) {
|
||||
case nostr.ProfilePointer:
|
||||
res, _ := EncodeProfile(v.PublicKey, v.Relays)
|
||||
return res
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user