sdk: return store event along with ProfileMetadata.

This commit is contained in:
fiatjaf
2023-10-31 15:22:55 -03:00
parent 711b0844b1
commit 5847335506
2 changed files with 10 additions and 3 deletions

View File

@ -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
}
}