feat: improve search and handle input in compose (#67)
* feat: support search by npub or nprofile * . * . * . * chore: prevent update local search with empty result * clean up * .
This commit is contained in:
@@ -11,7 +11,7 @@ pub const BOOTSTRAP_RELAYS: [&str; 4] = [
|
||||
"wss://relay.damus.io",
|
||||
"wss://relay.primal.net",
|
||||
"wss://user.kindpag.es",
|
||||
"wss://relaydiscovery.com",
|
||||
"wss://purplepag.es",
|
||||
];
|
||||
|
||||
/// NIP65 Relays. Used for new account
|
||||
@@ -26,7 +26,7 @@ pub const NIP65_RELAYS: [&str; 4] = [
|
||||
pub const NIP17_RELAYS: [&str; 2] = ["wss://auth.nostr1.com", "wss://relay.0xchat.com"];
|
||||
|
||||
/// Search Relays.
|
||||
pub const SEARCH_RELAYS: [&str; 1] = ["wss://relay.nostr.band"];
|
||||
pub const SEARCH_RELAYS: [&str; 2] = ["wss://search.nos.today", "wss://relay.nostr.band"];
|
||||
|
||||
/// Default relay for Nostr Connect
|
||||
pub const NOSTR_CONNECT_RELAY: &str = "wss://relay.nsec.app";
|
||||
|
||||
@@ -302,6 +302,12 @@ impl Globals {
|
||||
})
|
||||
}
|
||||
|
||||
pub async fn request_metadata(&self, public_key: PublicKey) {
|
||||
if let Err(e) = self.batch_sender.send(public_key).await {
|
||||
log::error!("Failed to request metadata: {e}")
|
||||
}
|
||||
}
|
||||
|
||||
/// Gets a person's profile from cache or creates default (blocking)
|
||||
pub fn person(&self, public_key: &PublicKey) -> Profile {
|
||||
let metadata = if let Some(metadata) = self.persons.read_blocking().get(public_key) {
|
||||
|
||||
Reference in New Issue
Block a user