commit e5b62f6
grunfink
·
2026-05-22 06:56:44 +0000 UTC
parent 871ea6a
Delete from the admire cache also when emojiunreacting.
1 files changed,
+4,
-1
M
html.c
M
html.c
+4,
-1
1@@ -5661,6 +5661,7 @@ int html_post_handler(const xs_dict *req, const char *q_path,
2 const char *eid = xs_dict_get(p_vars, "eid");
3
4 if (eid != NULL) {
5+ object_user_cache_del(&snac, id, "admire");
6 xs *n_msg = msg_emoji_unreact(&snac, id, eid);
7
8 if (n_msg != NULL)
9@@ -5675,8 +5676,10 @@ int html_post_handler(const xs_dict *req, const char *q_path,
10
11 xs *ret = msg_emoji_init(&snac, id, eid);
12 /* fails if either invalid or already reacted */
13- if (!ret)
14+ if (!ret) {
15+ object_user_cache_del(&snac, id, "admire");
16 ret = msg_emoji_unreact(&snac, id, eid);
17+ }
18 if (!ret)
19 status = HTTP_STATUS_NOT_FOUND;
20 }