mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-07-12 12:32:32 +02:00
sdk: return store event along with ProfileMetadata.
This commit is contained in:
@ -11,6 +11,7 @@ import (
|
||||
|
||||
type ProfileMetadata struct {
|
||||
pubkey string
|
||||
event *nostr.Event
|
||||
|
||||
Name string `json:"name,omitempty"`
|
||||
DisplayName string `json:"display_name,omitempty"`
|
||||
@ -47,6 +48,7 @@ func FetchProfileMetadata(ctx context.Context, pool *nostr.SimplePool, pubkey st
|
||||
for ie := range ch {
|
||||
if m, err := ParseMetadata(ie.Event); err == nil {
|
||||
m.pubkey = pubkey
|
||||
m.event = ie.Event
|
||||
return *m
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user