summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/html.c b/html.c
index 8e3152d..d74c44d 100644
--- a/html.c
+++ b/html.c
@@ -189,8 +189,9 @@ xs_str *html_msg_icon(snac *snac, xs_str *os, const xs_dict *msg)
189 char *udate = NULL; 189 char *udate = NULL;
190 char *url = NULL; 190 char *url = NULL;
191 int priv = 0; 191 int priv = 0;
192 const char *type = xs_dict_get(msg, "type");
192 193
193 if (strcmp(xs_dict_get(msg, "type"), "Note") == 0) 194 if (strcmp(type, "Note") == 0 || strcmp(type, "Question") == 0 || strcmp(type, "Page") == 0)
194 url = xs_dict_get(msg, "id"); 195 url = xs_dict_get(msg, "id");
195 196
196 priv = !is_msg_public(snac, msg); 197 priv = !is_msg_public(snac, msg);
@@ -856,7 +857,7 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
856 return xs_str_cat(os, s); 857 return xs_str_cat(os, s);
857 } 858 }
858 else 859 else
859 if (strcmp(type, "Note") != 0 && strcmp(type, "Question") != 0) { 860 if (strcmp(type, "Note") != 0 && strcmp(type, "Question") != 0 && strcmp(type, "Page") != 0) {
860 /* skip oddities */ 861 /* skip oddities */
861 return os; 862 return os;
862 } 863 }
@@ -974,6 +975,12 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
974 /* add the content */ 975 /* add the content */
975 s = xs_str_cat(s, "</div>\n<div class=\"e-content snac-content\">\n"); /** **/ 976 s = xs_str_cat(s, "</div>\n<div class=\"e-content snac-content\">\n"); /** **/
976 977
978 if (!xs_is_null(v = xs_dict_get(msg, "name"))) {
979 xs *es1 = encode_html(v);
980 xs *s1 = xs_fmt("<h3 class=\"snac-entry-title\">%s</h3>\n", es1);
981 s = xs_str_cat(s, s1);
982 }
983
977 /* is it sensitive? */ 984 /* is it sensitive? */
978 if (!xs_is_null(v = xs_dict_get(msg, "sensitive")) && xs_type(v) == XSTYPE_TRUE) { 985 if (!xs_is_null(v = xs_dict_get(msg, "sensitive")) && xs_type(v) == XSTYPE_TRUE) {
979 if (xs_is_null(v = xs_dict_get(msg, "summary")) || *v == '\0') 986 if (xs_is_null(v = xs_dict_get(msg, "summary")) || *v == '\0')