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

[REQUEST] Filtering by tags with empty string value #259

Open
heguro opened this issue Mar 9, 2023 · 0 comments
Open

[REQUEST] Filtering by tags with empty string value #259

heguro opened this issue Mar 9, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@heguro
Copy link

heguro commented Mar 9, 2023

Pledge
10000 sats

Is your feature request related to a problem? Please describe.
I wanted to search for events having tag ["d", ""] by using the filter {"#d": [""]}.
Currently this is rejected with the error invalid: "[2].#d[0]" is not allowed to be empty by this line (I think):

https://github.com/Cameri/nostream/blob/f23740073f6b59b230157528376a89ca44af3f27/test/unit/schemas/event-schema.spec.ts#L123

Describe the solution you'd like
Support for filtering tag value by "".

Additional context

  • I could use this filter in nostr-rs-relay.
  • You can see NIP-23 posts (kind:30023) and NIP-58 badges (kind:30009) having tag ["d", ""] at wss://nostr-pub.wellorder.net.
    • Send ["REQ", "subId", { "#d": [""] }] to the relay with Nostr Playground or other tool to see some cases.
  • There was a bug that d tag of some badges created with non-English name become empty string in badges.page. This is fixed, but some badges with tag ["d", ""] have already been published.
@heguro heguro added the enhancement New feature or request label Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants