diff options
-rw-r--r-- | server/lib/activitypub/actors/shared/url-to-object.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/server/lib/activitypub/actors/shared/url-to-object.ts b/server/lib/activitypub/actors/shared/url-to-object.ts index 12a121725..208d108ee 100644 --- a/server/lib/activitypub/actors/shared/url-to-object.ts +++ b/server/lib/activitypub/actors/shared/url-to-object.ts | |||
@@ -27,8 +27,11 @@ async function fetchRemoteActor (actorUrl: string): Promise<{ statusCode: number | |||
27 | } | 27 | } |
28 | 28 | ||
29 | async function fetchActorFollowsCount (actorObject: ActivityPubActor) { | 29 | async function fetchActorFollowsCount (actorObject: ActivityPubActor) { |
30 | const followersCount = await fetchActorTotalItems(actorObject.followers) | 30 | let followersCount = 0 |
31 | const followingCount = await fetchActorTotalItems(actorObject.following) | 31 | let followingCount = 0 |
32 | |||
33 | if (actorObject.followers) followersCount = await fetchActorTotalItems(actorObject.followers) | ||
34 | if (actorObject.following) followingCount = await fetchActorTotalItems(actorObject.following) | ||
32 | 35 | ||
33 | return { followersCount, followingCount } | 36 | return { followersCount, followingCount } |
34 | } | 37 | } |