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.
This commit is contained in:
evykassirer 2023-12-27 20:06:17 -08:00 committed by Tim Abbott
parent 84038a9984
commit 0e358b9f85
1 changed files with 4 additions and 2 deletions

View File

@ -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);
}
}