summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/html.c b/html.c
index fd6fbdf..31af896 100644
--- a/html.c
+++ b/html.c
@@ -484,8 +484,22 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, xs_set *seen, int local, i
484 if (xs_set_add(seen, id) == 0) 484 if (xs_set_add(seen, id) == 0)
485 return os; 485 return os;
486 486
487 if (strcmp(type, "Follow") == 0) 487 xs *s = xs_str_new(NULL);
488 return os; 488
489 if (strcmp(type, "Follow") == 0) {
490 actor = xs_dict_get(msg, "actor");
491
492 s = xs_str_cat(s, "<div class=\"snac-post\">\n");
493
494 xs *s1 = xs_fmt("<div class=\"snac-origin\">%s</div>\n", L("follows you"));
495 s = xs_str_cat(s, s1);
496
497 s = html_msg_icon(snac, s, msg);
498
499 s = xs_str_cat(s, "</div>\n");
500
501 return xs_str_cat(os, s);
502 }
489 503
490 /* bring the main actor */ 504 /* bring the main actor */
491 if ((actor = xs_dict_get(msg, "attributedTo")) == NULL) 505 if ((actor = xs_dict_get(msg, "attributedTo")) == NULL)
@@ -494,8 +508,6 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, xs_set *seen, int local, i
494 if (!valid_status(actor_get(snac, actor, &actor_o))) 508 if (!valid_status(actor_get(snac, actor, &actor_o)))
495 return os; 509 return os;
496 510
497 xs *s = xs_str_new(NULL);
498
499 /* if this is our post, add the score */ 511 /* if this is our post, add the score */
500 if (xs_startswith(id, snac->actor)) { 512 if (xs_startswith(id, snac->actor)) {
501 int likes = xs_list_len(xs_dict_get(meta, "liked_by")); 513 int likes = xs_list_len(xs_dict_get(meta, "liked_by"));