aboutsummaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authorgreen <dandelions@disroot.org>2025-05-19 15:25:11 +0200
committergreen <dandelions@disroot.org>2025-05-19 15:25:11 +0200
commit321f64ed70d039dea510c8a7d7aee7dc9577737a (patch)
treed7ba8d4398fdc1705cfe436b03bd87860d45d2e7 /activitypub.c
parent00fd1a1c3eb99c9e441276a7ce8697a1582152b7 (diff)
performance: use following_list_len in more places
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/activitypub.c b/activitypub.c
index a7e133a..120b4a1 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -3204,8 +3204,7 @@ int activitypub_get_handler(const xs_dict *req, const char *q_path,
int total = 0;
if (show_contact_metrics) {
- xs *l = follower_list(&snac);
- total = xs_list_len(l);
+ total = follower_list_len(&snac);
}
xs *id = xs_fmt("%s/%s", snac.actor, p_path);
@@ -3216,8 +3215,7 @@ int activitypub_get_handler(const xs_dict *req, const char *q_path,
int total = 0;
if (show_contact_metrics) {
- xs *l = following_list(&snac);
- total = xs_list_len(l);
+ total = following_list_len(&snac);
}
xs *id = xs_fmt("%s/%s", snac.actor, p_path);