aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--html.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/html.c b/html.c
index 122bfee..c503702 100644
--- a/html.c
+++ b/html.c
@@ -3794,6 +3794,20 @@ xs_html *html_people_list(snac *user, xs_list *list, const char *header, const c
xs_html_add(snac_post, snac_content);
}
+ /* does it have account metrics in the object? */
+ const xs_val *fwing = xs_dict_get(actor, "following_count");
+ const xs_val *fwers = xs_dict_get(actor, "followers_count");
+
+ if (!xs_is_null(fwing) && !xs_is_null(fwers)) {
+ xs *s = xs_fmt(L("%d following, %d followers"),
+ (int) xs_number_get_l(fwing), (int) xs_number_get_l(fwers));
+
+ xs_html_add(snac_post,
+ xs_html_tag("div",
+ xs_html_tag("p",
+ xs_html_text(s))));
+ }
+
/* add user metadata */
xs_html *snac_metadata = xs_html_tag("div",
xs_html_attr("class", "snac-metadata"));