web: fixed reactions not updating

This commit is contained in:
Thomas Mathews 2022-12-21 10:02:53 -08:00
parent 543738aa8e
commit f7d984f84e
2 changed files with 8 additions and 4 deletions

View file

@ -234,6 +234,7 @@ function view_timeline_update_reaction(model, ev) {
el = find_node(`.reactions`, root);
el.innerHTML = render_reactions_inner(model, model.all_events[ev_id]);
// Update like button
if (ev.pubkey == model.pubkey) {
const reaction = model_get_reacts_to(model, model.pubkey, ev_id, R_HEART);
const liked = !!reaction;