diff options
| author | 2023-05-29 09:20:25 +0200 | |
|---|---|---|
| committer | 2023-05-29 09:20:25 +0200 | |
| commit | 22fea1725536a51672c6d0ef5b26abc62ba4a1b2 (patch) | |
| tree | a58d25831338173f60eba2d10016beff1dff2bf4 /html.c | |
| parent | Close the question over due date in update_question(). (diff) | |
| download | snac2-22fea1725536a51672c6d0ef5b26abc62ba4a1b2.tar.gz snac2-22fea1725536a51672c6d0ef5b26abc62ba4a1b2.tar.xz snac2-22fea1725536a51672c6d0ef5b26abc62ba4a1b2.zip | |
Disallow voting your own polls.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 3 |
1 files changed, 3 insertions, 0 deletions
| @@ -900,6 +900,9 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local, | |||
| 900 | 900 | ||
| 901 | if (xs_dict_get(msg, "closed")) | 901 | if (xs_dict_get(msg, "closed")) |
| 902 | closed = 1; | 902 | closed = 1; |
| 903 | else | ||
| 904 | if (xs_startswith(id, snac->actor)) | ||
| 905 | closed = 1; /* we questioned? closed for us */ | ||
| 903 | else { | 906 | else { |
| 904 | /* not yet closed? check if we already voted for this */ | 907 | /* not yet closed? check if we already voted for this */ |
| 905 | xs *children = object_children(id); | 908 | xs *children = object_children(id); |