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

Suggestion: include parsers for outbox events #2

Open
antonioconselheiro opened this issue Aug 11, 2024 · 1 comment
Open

Suggestion: include parsers for outbox events #2

antonioconselheiro opened this issue Aug 11, 2024 · 1 comment

Comments

@antonioconselheiro
Copy link

Suggestion: include parser to cast outbox event (relay list, following list and r tag) into Record<string, { read: true, write: true }> or string[].

@antonioconselheiro
Copy link
Author

gm,

I wanna extend my suggestion.
Some times, events bring relays hint to help load related content, I'm not sure how you're doing to load this related content in these cases, maybe I'm suggesting some existing thing but here is my idea:

Include a hint parameter to options object:

    opts?: {
      signal?: AbortSignal,
      hint?: Array<NostrEvent> | Array<WebSocket['url']>
    }

Then delivery this hint to reqRouter as parameter, and maybe for eventRouter too. Is these function will use these parsers if the hint comes as a list of events.

This make sense?

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

No branches or pull requests

1 participant