summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/html.c b/html.c
index 7de26bc..cca6d82 100644
--- a/html.c
+++ b/html.c
@@ -896,10 +896,30 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
896 xs_list *ao = xs_dict_get(msg, "anyOf"); 896 xs_list *ao = xs_dict_get(msg, "anyOf");
897 xs_list *p; 897 xs_list *p;
898 xs_dict *v; 898 xs_dict *v;
899 int closed = 0;
899 900
901 if (xs_dict_get(msg, "closed"))
902 closed = 1;
903 else {
904 /* not yet closed? check if we already voted for this */
905 xs *children = object_children(id);
906 p = children;
907 while (!closed && xs_list_iter(&p, &v)) {
908 xs *msg = NULL;
909
910 if (valid_status(object_get_by_md5(v, &msg))) {
911 const char *atto = xs_dict_get(msg, "attributedTo");
912
913 if (atto && strcmp(atto, snac->actor) == 0)
914 closed = 1; /* closed for us */
915 }
916 }
917 }
918
919 /* get the appropriate list of options */
900 p = oo != NULL ? oo : ao; 920 p = oo != NULL ? oo : ao;
901 921
902 if (!xs_is_null(xs_dict_get(msg, "closed"))) { 922 if (closed) {
903 /* closed poll */ 923 /* closed poll */
904 c = xs_str_cat(c, "<table>\n"); 924 c = xs_str_cat(c, "<table>\n");
905 925