commit 60fc87d

default  ·  2023-05-31 04:14:14 +0000 UTC
parent ca2e0fc
Don't hide replies to polls (that are not votes).
1 files changed,  +5, -1
M html.c
M html.c
+5, -1
 1@@ -769,6 +769,10 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
 2         return os;
 3     }
 4 
 5+    /* ignore notes with "name", as they are votes to Questions */
 6+    if (strcmp(type, "Note") == 0 && !xs_is_null(xs_dict_get(msg, "name")))
 7+        return os;
 8+
 9     /* bring the main actor */
10     if ((actor = xs_dict_get(msg, "attributedTo")) == NULL)
11         return os;
12@@ -1061,7 +1065,7 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
13         s = html_entry_controls(snac, s, msg, md5);
14 
15     /** children **/
16-    if (!hide_children && strcmp(type, "Question") != 0) {
17+    if (!hide_children) {
18         xs *children = object_children(id);
19         int left     = xs_list_len(children);
20