From dc1c4ada365406cfd4da68eda6cc5e11a0ecef57 Mon Sep 17 00:00:00 2001 From: alanpoon Date: Mon, 9 Dec 2024 13:58:55 +0800 Subject: [PATCH] changed to map --- src/home/event_reaction.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/home/event_reaction.rs b/src/home/event_reaction.rs index 7231b5d..f3191d0 100644 --- a/src/home/event_reaction.rs +++ b/src/home/event_reaction.rs @@ -324,8 +324,8 @@ impl ReactionListRef { if sender == &user_id { includes_user = true; } - let sender_name = get_user_profile(_cx, sender).and_then(|profile| { - Some(profile.displayable_name().to_owned()) + let sender_name = get_user_profile(_cx, sender).map(|profile| { + profile.displayable_name().to_owned() }).unwrap_or(sender.to_string()); sender_name }).collect();