summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'data.c')
-rw-r--r--data.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/data.c b/data.c
index e3fa52d..f9d27f9 100644
--- a/data.c
+++ b/data.c
@@ -1215,6 +1215,14 @@ int follower_check(snac *snac, const char *actor)
1215} 1215}
1216 1216
1217 1217
1218int follower_list_len(snac *snac)
1219/* returns the number of followers */
1220{
1221 xs *list = object_user_cache_list(snac, "followers", XS_ALL, 0);
1222 return xs_list_len(list);
1223}
1224
1225
1218xs_list *follower_list(snac *snac) 1226xs_list *follower_list(snac *snac)
1219/* returns the list of followers */ 1227/* returns the list of followers */
1220{ 1228{
@@ -1709,6 +1717,15 @@ int following_get(snac *snac, const char *actor, xs_dict **data)
1709} 1717}
1710 1718
1711 1719
1720int following_list_len(snac *snac)
1721/* returns number of people being followed */
1722{
1723 xs *spec = xs_fmt("%s/following/" "*_a.json", snac->basedir);
1724 xs *glist = xs_glob(spec, 0, 0);
1725 return xs_list_len(glist);
1726}
1727
1728
1712xs_list *following_list(snac *snac) 1729xs_list *following_list(snac *snac)
1713/* returns the list of people being followed */ 1730/* returns the list of people being followed */
1714{ 1731{