diff options
| author | 2023-05-31 06:14:14 +0200 | |
|---|---|---|
| committer | 2023-05-31 06:14:14 +0200 | |
| commit | 60fc87d845c45b605f3c6a81990d2e99a61fd8ae (patch) | |
| tree | 3234f7212303ba64c7a59571018e0917d30f5d59 | |
| parent | Backport from xs. (diff) | |
| download | snac2-60fc87d845c45b605f3c6a81990d2e99a61fd8ae.tar.gz snac2-60fc87d845c45b605f3c6a81990d2e99a61fd8ae.tar.xz snac2-60fc87d845c45b605f3c6a81990d2e99a61fd8ae.zip | |
Don't hide replies to polls (that are not votes).
| -rw-r--r-- | html.c | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -769,6 +769,10 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local, | |||
| 769 | return os; | 769 | return os; |
| 770 | } | 770 | } |
| 771 | 771 | ||
| 772 | /* ignore notes with "name", as they are votes to Questions */ | ||
| 773 | if (strcmp(type, "Note") == 0 && !xs_is_null(xs_dict_get(msg, "name"))) | ||
| 774 | return os; | ||
| 775 | |||
| 772 | /* bring the main actor */ | 776 | /* bring the main actor */ |
| 773 | if ((actor = xs_dict_get(msg, "attributedTo")) == NULL) | 777 | if ((actor = xs_dict_get(msg, "attributedTo")) == NULL) |
| 774 | return os; | 778 | return os; |
| @@ -1061,7 +1065,7 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local, | |||
| 1061 | s = html_entry_controls(snac, s, msg, md5); | 1065 | s = html_entry_controls(snac, s, msg, md5); |
| 1062 | 1066 | ||
| 1063 | /** children **/ | 1067 | /** children **/ |
| 1064 | if (!hide_children && strcmp(type, "Question") != 0) { | 1068 | if (!hide_children) { |
| 1065 | xs *children = object_children(id); | 1069 | xs *children = object_children(id); |
| 1066 | int left = xs_list_len(children); | 1070 | int left = xs_list_len(children); |
| 1067 | 1071 | ||