post-475 fixes#481
Merged
tlongwell-block merged 3 commits intomainfrom May 5, 2026
Merged
Conversation
d835d42 to
99eb675
Compare
…arch Two fixes for display names not showing in the pure-nostr desktop: 1. get_channel_members: batch-fetch kind:0 profiles for member pubkeys and populate display_name. Fixes member sidebar and @mention autocomplete. 2. search_users: replace NIP-50 Typesense search with fetch-all-kind:0 + client-side filter. The old REST endpoint used DB ILIKE; Typesense doesn't tokenize JSON content well for short name queries. Fetching ~2000 kind:0 events and filtering by display_name/nip05/pubkey prefix is equivalent performance for corporate-scale relays.
99eb675 to
c05db4d
Compare
…e addressable events In dev mode (SPROUT_REQUIRE_AUTH_TOKEN=false), the relay previously generated a random keypair on every restart. Since replace_addressable_event keys on (kind, pubkey, channel_id), each restart created duplicate kind:39000/39001/39002 events instead of replacing them — causing forum channels to appear as streams and duplicate entries in the channel list. Fix: use a hardcoded dev keypair (privkey=1, the secp256k1 generator point) when no SPROUT_RELAY_PRIVATE_KEY is configured and auth is disabled. This ensures addressable events replace correctly across restarts. In production (require_auth_token=true), the relay now panics if no private key is configured, preventing silent fallback to an unstable identity.
- resolve DM participant display names client-side via batch kind:0 fetch - dedupe kind:39000 metadata by `d` tag, keeping the latest revision - match desktop's case-insensitive sort within each channel section - defer the "Could not load channels" view 2s to absorb transient AsyncError frames from relay reconnect cancellations Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The member sidebar and @mention autocomplete show truncated pubkeys instead of display names.
Root cause:
get_channel_membersreturns members from kind:39002 p-tags which only contain pubkeys and roles — no profile data. The old REST endpoint did a DB join to include names.Fix: After fetching kind:39002, batch-fetch kind:0 profile events for all member pubkeys and populate
display_namefrom profile content. Same approach the message timeline already uses viagetUsersBatch.37 lines changed, 1 file.