Skip to content

Filters, FiltersEncoder, FiltersDecoder re-implemenation #197

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

Merged
merged 54 commits into from
Feb 23, 2025

Conversation

avlo
Copy link
Collaborator

@avlo avlo commented Feb 20, 2025

hi, eric. below PR comprised of (predominantly) Filters, FiltersEncoder, FiltersDecoder re-implemenation for flexible use by ReqMessage and other nostr-java Filter clients as well as superconductor (which extensively leverages updated flexibility to properly handle requests, NIP-09/deletions and other filtering considerations).

you'll notice git showing (below) 95 files changed, however, the vast majority of those were deletions of unused/vestigial classes. general overview of all changes/updates as follows:

updated:

  • NIP01.java removed createFilters() method since both unused and annotated deprecated for removal
  • Nostr.java unused- removed, superseded by NostrSpringWebSocketClient
  • GenericEventTagQuery filter introduced, supports non-standard filter tags, super easy to use (no Map required)- examples contained throughout both FiltersEncoderTest and FiltersDecoderTest
  • NostrSpringWebSocketClient refactored, tightened up
  • ambiguous NostrIF.java send() method(s) updated to sendEvent() for events and sendRequest() for requests
  • Filters implementation refactored including a Filterable interface implemented by each filterable type
  • FiltersEncoder & FiltersDecoder updated, comprehensive filters testing coverage
  • GenericTagQuery refactored
  • Client.java unused, removed, superseded by NostrSpringWebSocketClient
  • BaseMessageDecoder refactor/cleanup
  • ReqMessage updated using new Filters mechanism
  • Task.java unused, removed

new:

  • added CalendarRsvpEvent

tests:

  • APINIP09EventTest use updated Filters mechanism, successfully testing against SC (which now supports event deletion)
  • existing unit test Filter usage have slight syntactic modification
  • new unit tests added for all filter related classes
  • JsonParseTest request methods updated w/ new filter mechanism
  • several JsonParseTest filter testing methods moved to new FiltersEncoderTest & FiltersDecoderTest classes

poms/packages/dependecies:
all below unused, removed- superseded by NostrSpringWebSocketClient

  • nostr-java-connection package unused, removed
  • nostr-java-command-interface package unused, removed
  • nostr-java-command-provider package unused, removed
  • nostr-java-controller, package unused, removed

with all unit and integrations tests passing as expected (testing against SC develop branch). i'll additionally cancel my other outstanding PR as this one contains all its changes and more.

if any questions/concerns/omissions/etc pls advise

@tcheeric tcheeric merged commit 5dec7cc into tcheeric:develop Feb 23, 2025
@avlo avlo deleted the filters_refactor branch February 23, 2025 22:15
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.

2 participants