fix(nostr_users): don't attach key to username

Somehow filtering consistently shows all tasks of same-named users anyways
This commit is contained in:
xeruf 2025-01-23 15:00:40 +01:00
parent 8c1902c1d3
commit 7acdede38c

View file

@ -46,9 +46,8 @@ impl NostrUsers {
pub(crate) fn get_username(&self, pubkey: &PublicKey) -> String {
self.users.get(pubkey)
.and_then(|m| m.name.as_ref())
.map_or_else(|| format!("{:.6}", pubkey.to_string()),
|m| format!("{}@{:.6}", m, pubkey.to_string()))
.and_then(|m| m.name.clone())
.unwrap_or_else(|| format!("{:.6}", pubkey.to_string()))
}
pub(super) fn insert(&mut self, pubkey: PublicKey, metadata: Metadata, timestamp: Timestamp) {