You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the enhancement
As titled. Currently Events are received without knowing which Relay its from if they are obtained through the get_events_of() client function. Suggestion here is to also return the URL as part of the callback (eg. in pool.rs)
Use case
It would help to determine which Relay to reply to, or DM to, if an application wishes to reply to the author of a particular event.
The text was updated successfully, but these errors were encountered:
Hi, from commit f20c776 (PR #178) it's possible to query the local database (in-memory or persistent) to know in which relays the event was seen.
You can try this code using master branch:
Seems to work, at least in my integration test environment. I am using event_recently_seen_on_relays() after calling get_events_of(). The first time I see an event, I call event_recently_seen_on_relays() and keep track of that event along with the relay url HashSet, and drop all subsequent occurrence of that eventID. The expectation is that the number of urls seen from event_recently_seen_on_relays() will always match the actual number of occurrences the events gets seen as a result of get_events_of().
I guess the most ideal is that the relay URL is part of the Event struct so that this somewhat hacky correlation is not needed?
Describe the enhancement
As titled. Currently Events are received without knowing which Relay its from if they are obtained through the
get_events_of()
client function. Suggestion here is to also return the URL as part of the callback (eg. in pool.rs)Use case
It would help to determine which Relay to reply to, or DM to, if an application wishes to reply to the author of a particular event.
The text was updated successfully, but these errors were encountered: