Skip to content

Commit

Permalink
changed to map
Browse files Browse the repository at this point in the history
  • Loading branch information
alanpoon committed Dec 9, 2024
1 parent d6c2bfd commit dc1c4ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/home/event_reaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit dc1c4ad

Please sign in to comment.