summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-12-03 17:58:49 +0100
committerdefault <nobody@localhost>2022-12-03 17:58:49 +0100
commitd00026ac063e960728c5147634ff3591828efced (patch)
tree0456668b56eb64bfdbd2c513a479cc02b247a9d2 /html.c
parentaf6d31ff83bfe1eb6f4d37c5623e35f149e9aee5 (diff)
Upgraded local/ to public/.
Diffstat (limited to 'html.c')
-rw-r--r--html.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/html.c b/html.c
index 3c5d0bc..6790578 100644
--- a/html.c
+++ b/html.c
@@ -594,7 +594,7 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, int local, int level, int
/* is the parent not here? */
char *parent = xs_dict_get(msg, "inReplyTo");
- if (!xs_is_null(parent) && !object_here(parent)) {
+ if (!xs_is_null(parent) && *parent && !object_here(parent)) {
xs *s1 = xs_fmt(
"<div class=\"snac-origin\">%s "
"<a href=\"%s\">ยป</a></div>\n",
@@ -625,6 +625,12 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, int local, int level, int
}
{
+ xs *md5 = xs_md5_hex(id, strlen(id));
+ xs *s1 = xs_fmt("<p><code>%s</code></p>\n", md5);
+ s = xs_str_cat(s, s1);
+ }
+
+ {
xs *c = sanitize(xs_dict_get(msg, "content"));
char *p, *v;