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" }),
|
collections.ap_following.countDocuments({ source: "federation" }),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const total = remaining + sent + failed;
|
// Include federated in totals — accounts transition from refollow:sent
|
||||||
const completed = sent + failed;
|
// 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 =
|
const progressPercent =
|
||||||
total > 0 ? Math.round((completed / total) * 100) : 100;
|
total > 0 ? Math.round((completed / total) * 100) : 100;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@rmdes/indiekit-endpoint-activitypub",
|
"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.",
|
"description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"indiekit",
|
"indiekit",
|
||||||
|
|||||||
Reference in New Issue
Block a user