mirror of
https://github.com/svemagie/indiekit-endpoint-activitypub.git
synced 2026-04-02 15:44:58 +02:00
fix: include federated accounts in progress bar calculation
When Accept(Follow) arrives, source transitions from refollow:sent to federation. Without counting federated in the total, those accounts drop out of both numerator and denominator, making the progress bar stay flat or go backwards.
This commit is contained in:
@@ -122,8 +122,10 @@ export async function getBatchRefollowStatus(collections) {
|
||||
collections.ap_following.countDocuments({ source: "federation" }),
|
||||
]);
|
||||
|
||||
const total = remaining + sent + failed;
|
||||
const completed = sent + failed;
|
||||
// Include federated in totals — accounts transition from refollow:sent
|
||||
// to federation when Accept arrives, so they must stay in the math
|
||||
const total = remaining + sent + failed + federated;
|
||||
const completed = sent + failed + federated;
|
||||
const progressPercent =
|
||||
total > 0 ? Math.round((completed / total) * 100) : 100;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@rmdes/indiekit-endpoint-activitypub",
|
||||
"version": "1.0.12",
|
||||
"version": "1.0.13",
|
||||
"description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.",
|
||||
"keywords": [
|
||||
"indiekit",
|
||||
|
||||
Reference in New Issue
Block a user