Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pubsub: use relay hints #382

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

npub1zenn0
Copy link
Contributor

Follows referred events' relay hints. Meaning with this, the app will subscribe to events from the relay hinted in e/p tags: e.g. from ['e', <hexkey>, 'wss://nos.lol', 'reply'].

Adds relay hints to published e and p tags.

Fixes published events incorrectly showing up as "Found by Iris.to API".

Follows referred events' relay hints.

Adds relay hints to `e` tags. In theory it'd also work for `p` tags,
however the profiles are found via the iris.to API and thus there
isn't any trace about where the profile came from.

Fixes published events incorrectly showing up as "Found by Iris.to API".
@npub1zenn0
Copy link
Contributor Author

p tags won't usually get the hint because the profiles are fetched from api.iris.to which doesn't provide relay info. Might be worth returning the relays from the api at some point.

@npub1zenn0
Copy link
Contributor Author

Worth noting that the referred relays get connected to for the rest of the session. If that turns out to be a problem, e.g. too many websocket connections stack up, then fixing it in the relaypool library is prob for the best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant