summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-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)
143} 143}
144 144
145 145
146d_char *html_msg_icon(snac *snac, d_char *s, char *msg) 146d_char *html_msg_icon(snac *snac, d_char *os, char *msg)
147{ 147{
148 char *actor_id; 148 char *actor_id;
149 xs *actor = NULL; 149 xs *actor = NULL;
150 150
151 xs *s = xs_str_new(NULL);
152
151 if ((actor_id = xs_dict_get(msg, "attributedTo")) == NULL) 153 if ((actor_id = xs_dict_get(msg, "attributedTo")) == NULL)
152 actor_id = xs_dict_get(msg, "actor"); 154 actor_id = xs_dict_get(msg, "actor");
153 155
@@ -202,7 +204,7 @@ d_char *html_msg_icon(snac *snac, d_char *s, char *msg)
202 } 204 }
203 } 205 }
204 206
205 return s; 207 return xs_str_cat(os, s);
206} 208}
207 209
208 210
@@ -480,7 +482,7 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, xs_set *seen, int level)
480 } 482 }
481 } 483 }
482 484
483 s = xs_str_cat(s, "</div> <!-- e-content -->\n"); 485 s = xs_str_cat(s, "</div>\n");
484 486
485 char *children = xs_dict_get(meta, "children"); 487 char *children = xs_dict_get(meta, "children");
486 488
@@ -507,10 +509,10 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, xs_set *seen, int level)
507 left--; 509 left--;
508 } 510 }
509 511
510 s = xs_str_cat(s, "</div> <!-- snac-children -->\n"); 512 s = xs_str_cat(s, "</div>\n");
511 } 513 }
512 514
513 s = xs_str_cat(s, "</div> <!-- post or child -->\n"); 515 s = xs_str_cat(s, "</div>\n");
514 516
515 return xs_str_cat(os, s); 517 return xs_str_cat(os, s);
516} 518}
@@ -551,7 +553,7 @@ d_char *html_timeline(snac *snac, char *list, int local)
551 s = html_entry(snac, s, msg, seen, 0); 553 s = html_entry(snac, s, msg, seen, 0);
552 } 554 }
553 555
554 s = xs_str_cat(s, "</div> <!-- snac-posts -->\n"); 556 s = xs_str_cat(s, "</div>\n");
555 557
556 s = html_user_footer(snac, s); 558 s = html_user_footer(snac, s);
557 559