aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/actor.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/activitypub/actor.ts')
-rw-r--r--server/lib/activitypub/actor.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts
index 9eabef4b0..c3598b75b 100644
--- a/server/lib/activitypub/actor.ts
+++ b/server/lib/activitypub/actor.ts
@@ -1,8 +1,8 @@
1import * as Bluebird from 'bluebird' 1import * as Bluebird from 'bluebird'
2import { Transaction } from 'sequelize' 2import { Transaction } from 'sequelize'
3import { URL } from 'url' 3import { URL } from 'url'
4import * as uuidv4 from 'uuid/v4' 4import { v4 as uuidv4 } from 'uuid'
5import { ActivityPubActor, ActivityPubActorType } from '../../../shared/models/activitypub' 5import { ActivityPubActor, ActivityPubActorType, ActivityPubOrderedCollection } from '../../../shared/models/activitypub'
6import { ActivityPubAttributedTo } from '../../../shared/models/activitypub/objects' 6import { ActivityPubAttributedTo } from '../../../shared/models/activitypub/objects'
7import { checkUrlsSameHost, getAPId } from '../../helpers/activitypub' 7import { checkUrlsSameHost, getAPId } from '../../helpers/activitypub'
8import { sanitizeAndCheckActorObject } from '../../helpers/custom-validators/activitypub/actor' 8import { sanitizeAndCheckActorObject } from '../../helpers/custom-validators/activitypub/actor'
@@ -207,7 +207,7 @@ async function fetchActorTotalItems (url: string) {
207 } 207 }
208 208
209 try { 209 try {
210 const { body } = await doRequest(options) 210 const { body } = await doRequest<ActivityPubOrderedCollection<unknown>>(options)
211 return body.totalItems ? body.totalItems : 0 211 return body.totalItems ? body.totalItems : 0
212 } catch (err) { 212 } catch (err) {
213 logger.warn('Cannot fetch remote actor count %s.', url, { err }) 213 logger.warn('Cannot fetch remote actor count %s.', url, { err })