summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-09-29 09:19:42 +0200
committerdefault <nobody@localhost>2022-09-29 09:19:42 +0200
commitab38029192e87b94923c31f2689a2e7025c47994 (patch)
tree708443513bbea53bcc5f5bf822dcb18d4e8cc1f2
parent49bca7e273640c65f9aa41309805ff3f7425123d (diff)
More HTML work.
-rw-r--r--html.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/html.c b/html.c
index 5b336bc..aca1b30 100644
--- a/html.c
+++ b/html.c
@@ -143,11 +143,13 @@ int login(snac *snac, char *headers)
}
-d_char *html_msg_icon(snac *snac, d_char *s, char *msg)
+d_char *html_msg_icon(snac *snac, d_char *os, char *msg)
{
char *actor_id;
xs *actor = NULL;
+ xs *s = xs_str_new(NULL);
+
if ((actor_id = xs_dict_get(msg, "attributedTo")) == NULL)
actor_id = xs_dict_get(msg, "actor");
@@ -202,7 +204,7 @@ d_char *html_msg_icon(snac *snac, d_char *s, char *msg)
}
}
- return s;
+ return xs_str_cat(os, s);
}
@@ -480,7 +482,7 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, xs_set *seen, int level)
}
}
- s = xs_str_cat(s, "</div> <!-- e-content -->\n");
+ s = xs_str_cat(s, "</div>\n");
char *children = xs_dict_get(meta, "children");
@@ -507,10 +509,10 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, xs_set *seen, int level)
left--;
}
- s = xs_str_cat(s, "</div> <!-- snac-children -->\n");
+ s = xs_str_cat(s, "</div>\n");
}
- s = xs_str_cat(s, "</div> <!-- post or child -->\n");
+ s = xs_str_cat(s, "</div>\n");
return xs_str_cat(os, s);
}
@@ -551,7 +553,7 @@ d_char *html_timeline(snac *snac, char *list, int local)
s = html_entry(snac, s, msg, seen, 0);
}
- s = xs_str_cat(s, "</div> <!-- snac-posts -->\n");
+ s = xs_str_cat(s, "</div>\n");
s = html_user_footer(snac, s);