summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-06-15 17:24:44 +0200
committerdefault <nobody@localhost>2023-06-15 17:24:44 +0200
commit262de20aa8adf097454cdf4c3c36d84a8931c43b (patch)
treecd269f089affa4c3be9c35c3d76a6308e4689da5 /html.c
parent09e0d9925189a3fd5a442f9ed41fbd9fc47e1910 (diff)
Fixed voting / replying confusion.
Diffstat (limited to 'html.c')
-rw-r--r--html.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/html.c b/html.c
index ad8020d..b652064 100644
--- a/html.c
+++ b/html.c
@@ -985,21 +985,9 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
else
if (xs_startswith(id, snac->actor))
closed = 1; /* we questioned; closed for us */
- else {
- /* not yet closed? check if we already voted for this */
- xs *children = object_children(id);
- p = children;
- while (!closed && xs_list_iter(&p, &v)) {
- xs *msg = NULL;
-
- if (valid_status(object_get_by_md5(v, &msg))) {
- const char *atto = xs_dict_get(msg, "attributedTo");
-
- if (atto && strcmp(atto, snac->actor) == 0)
- closed = 1; /* we already voted; closed for us */
- }
- }
- }
+ else
+ if (was_question_voted(snac, id))
+ closed = 1; /* we already voted; closed for us */
/* get the appropriate list of options */
p = oo != NULL ? oo : ao;