NIP 50 Search #110
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When searching rooms/spaces/everything, use NIP 50 with the appropriate relays (either the user's search relays, the default relays, or the space's relay).
Hi @hodlbod.
I've opened a PR for this — I replaced the local Fuse.js search with NIP-50 relay-side search in
SpaceSearch.svelte.Approach
The old implementation used
createSearch(Fuse.js) over events already in the local repository, so it could only find messages that had been loaded into memory. I changed it to send arequest()with the NIP-50searchfilter field directly to relays.Scope selection — I added three search scopes the user can toggle between:
#htag filteruserSearchRelayList, falling back toDEFAULT_RELAYSif none are configuredOther details:
AbortControllerto cancel in-flight requests when a new search is triggeredWould appreciate a review when you get a chance. Thanks!