From 0e358b9f8541d6d444e27ebb8c61c61431f275cc Mon Sep 17 00:00:00 2001 From: evykassirer Date: Wed, 27 Dec 2023 20:06:17 -0800 Subject: [PATCH] reactions: Always call update_user_fields with should_display_reactors. This was wrong before. `update_user_fields` is called with `should_display_reactors` everywhere else. --- web/src/reactions.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/reactions.js b/web/src/reactions.js index 03095c36bf..7a169f2ec8 100644 --- a/web/src/reactions.js +++ b/web/src/reactions.js @@ -248,7 +248,8 @@ export function add_reaction(event) { if (clean_reaction_object) { clean_reaction_object.user_ids.push(user_id); - update_user_fields(clean_reaction_object, message.clean_reactions); + const should_display_reactors = check_should_display_reactors(message.clean_reactions); + update_user_fields(clean_reaction_object, should_display_reactors); update_existing_reaction(clean_reaction_object, message, user_id); } else { clean_reaction_object = make_clean_reaction({ @@ -260,7 +261,8 @@ export function add_reaction(event) { }); message.clean_reactions.set(local_id, clean_reaction_object); - update_user_fields(clean_reaction_object, message.clean_reactions); + const should_display_reactors = check_should_display_reactors(message.clean_reactions); + update_user_fields(clean_reaction_object, should_display_reactors); insert_new_reaction(clean_reaction_object, message, user_id); } }