mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-08-27 06:01:24 +02:00
replace deprecated functions in multiple places.
This commit is contained in:
@@ -32,7 +32,7 @@ func TestMetadataAndEvents(t *testing.T) {
|
||||
Limit: 5,
|
||||
}
|
||||
events := make([]*nostr.Event, 0, 5)
|
||||
for ie := range sys.Pool.SubManyEose(ctx, relays, nostr.Filters{filter}) {
|
||||
for ie := range sys.Pool.FetchMany(ctx, relays, filter) {
|
||||
events = append(events, ie.Event)
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
@@ -10,11 +10,9 @@ func (sys *System) SearchUsers(ctx context.Context, query string) []ProfileMetad
|
||||
limit := 10
|
||||
profiles := make([]ProfileMetadata, 0, limit*len(sys.UserSearchRelays.URLs))
|
||||
|
||||
for ie := range sys.Pool.SubManyEose(ctx, sys.UserSearchRelays.URLs, nostr.Filters{
|
||||
{
|
||||
Search: query,
|
||||
Limit: limit,
|
||||
},
|
||||
for ie := range sys.Pool.FetchMany(ctx, sys.UserSearchRelays.URLs, nostr.Filter{
|
||||
Search: query,
|
||||
Limit: limit,
|
||||
}, nostr.WithLabel("search")) {
|
||||
m, _ := ParseMetadata(ie.Event)
|
||||
profiles = append(profiles, m)
|
||||
|
Reference in New Issue
Block a user