From 7acdede38c838248c6fe37ced1adedf54710155e Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Thu, 23 Jan 2025 15:00:40 +0100 Subject: [PATCH] fix(nostr_users): don't attach key to username Somehow filtering consistently shows all tasks of same-named users anyways --- src/tasks/nostr_users.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tasks/nostr_users.rs b/src/tasks/nostr_users.rs index f3db26f..1fcbbd0 100644 --- a/src/tasks/nostr_users.rs +++ b/src/tasks/nostr_users.rs @@ -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) {