Why Nostr? What is Njump?
2023-05-06 03:11:42

prs on Nostr: fix: npub search fails on the first try (#1100) This PR fixes the issue where npub ...

fix: npub search fails on the first try (#1100)

This PR fixes the issue where npub search fails on the first try.

What was happening:
`SearchEventView` calls `find_event(state:evid:search_type:find_from:callback:)` to search for the entered npub. The search actually succeeded, but the call site was ignoring the returned event and never caching the profile. The reason it works the second time is because the `RelayPool` eventually got around to caching the profile. This is also why the other PR related to this issue works by adding a short delay.

How it's fixed:
Now `SearchingEventView` will call `process_metadata_event(events:our_pubkey:profiles:ev:)`, and upon completion, will update the view state with the successful result.

fix-npub-search, 1 commits

https://github.com/damus-io/damus/pull/1100
Author Public Key
npub1ahckk8wkr64n2w5r4arsesf42upfhlmgy76vhxmlex7mvv4zhrnqry7v97