diff options
| author | 2025-05-19 15:25:11 +0200 | |
|---|---|---|
| committer | 2025-05-19 15:25:11 +0200 | |
| commit | 321f64ed70d039dea510c8a7d7aee7dc9577737a (patch) | |
| tree | d7ba8d4398fdc1705cfe436b03bd87860d45d2e7 /activitypub.c | |
| parent | performance: functions to get the number of followers (diff) | |
| download | penes-snac2-321f64ed70d039dea510c8a7d7aee7dc9577737a.tar.gz penes-snac2-321f64ed70d039dea510c8a7d7aee7dc9577737a.tar.xz penes-snac2-321f64ed70d039dea510c8a7d7aee7dc9577737a.zip | |
performance: use following_list_len in more places
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 6 |
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, | |||
| 3204 | int total = 0; | 3204 | int total = 0; |
| 3205 | 3205 | ||
| 3206 | if (show_contact_metrics) { | 3206 | if (show_contact_metrics) { |
| 3207 | xs *l = follower_list(&snac); | 3207 | total = follower_list_len(&snac); |
| 3208 | total = xs_list_len(l); | ||
| 3209 | } | 3208 | } |
| 3210 | 3209 | ||
| 3211 | xs *id = xs_fmt("%s/%s", snac.actor, p_path); | 3210 | 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, | |||
| 3216 | int total = 0; | 3215 | int total = 0; |
| 3217 | 3216 | ||
| 3218 | if (show_contact_metrics) { | 3217 | if (show_contact_metrics) { |
| 3219 | xs *l = following_list(&snac); | 3218 | total = following_list_len(&snac); |
| 3220 | total = xs_list_len(l); | ||
| 3221 | } | 3219 | } |
| 3222 | 3220 | ||
| 3223 | xs *id = xs_fmt("%s/%s", snac.actor, p_path); | 3221 | xs *id = xs_fmt("%s/%s", snac.actor, p_path); |