diff options
| author | 2023-06-15 17:24:44 +0200 | |
|---|---|---|
| committer | 2023-06-15 17:24:44 +0200 | |
| commit | 262de20aa8adf097454cdf4c3c36d84a8931c43b (patch) | |
| tree | cd269f089affa4c3be9c35c3d76a6308e4689da5 /html.c | |
| parent | Increased log level for enqueue_request_replies(). (diff) | |
| download | snac2-262de20aa8adf097454cdf4c3c36d84a8931c43b.tar.gz snac2-262de20aa8adf097454cdf4c3c36d84a8931c43b.tar.xz snac2-262de20aa8adf097454cdf4c3c36d84a8931c43b.zip | |
Fixed voting / replying confusion.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 18 |
1 files changed, 3 insertions, 15 deletions
| @@ -985,21 +985,9 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local, | |||
| 985 | else | 985 | else |
| 986 | if (xs_startswith(id, snac->actor)) | 986 | if (xs_startswith(id, snac->actor)) |
| 987 | closed = 1; /* we questioned; closed for us */ | 987 | closed = 1; /* we questioned; closed for us */ |
| 988 | else { | 988 | else |
| 989 | /* not yet closed? check if we already voted for this */ | 989 | if (was_question_voted(snac, id)) |
| 990 | xs *children = object_children(id); | 990 | closed = 1; /* we already voted; closed for us */ |
| 991 | p = children; | ||
| 992 | while (!closed && xs_list_iter(&p, &v)) { | ||
| 993 | xs *msg = NULL; | ||
| 994 | |||
| 995 | if (valid_status(object_get_by_md5(v, &msg))) { | ||
| 996 | const char *atto = xs_dict_get(msg, "attributedTo"); | ||
| 997 | |||
| 998 | if (atto && strcmp(atto, snac->actor) == 0) | ||
| 999 | closed = 1; /* we already voted; closed for us */ | ||
| 1000 | } | ||
| 1001 | } | ||
| 1002 | } | ||
| 1003 | 991 | ||
| 1004 | /* get the appropriate list of options */ | 992 | /* get the appropriate list of options */ |
| 1005 | p = oo != NULL ? oo : ao; | 993 | p = oo != NULL ? oo : ao; |