diff options
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/activitypub/collection.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/activitypub/collection.ts b/server/lib/activitypub/collection.ts index f897141ea..a176cab51 100644 --- a/server/lib/activitypub/collection.ts +++ b/server/lib/activitypub/collection.ts | |||
@@ -3,6 +3,7 @@ import validator from 'validator' | |||
3 | import { pageToStartAndCount } from '@server/helpers/core-utils' | 3 | import { pageToStartAndCount } from '@server/helpers/core-utils' |
4 | import { ACTIVITY_PUB } from '@server/initializers/constants' | 4 | import { ACTIVITY_PUB } from '@server/initializers/constants' |
5 | import { ResultList } from '@shared/models' | 5 | import { ResultList } from '@shared/models' |
6 | import { forceNumber } from '@shared/core-utils' | ||
6 | 7 | ||
7 | type ActivityPubCollectionPaginationHandler = (start: number, count: number) => Bluebird<ResultList<any>> | Promise<ResultList<any>> | 8 | type ActivityPubCollectionPaginationHandler = (start: number, count: number) => Bluebird<ResultList<any>> | Promise<ResultList<any>> |
8 | 9 | ||
@@ -33,7 +34,7 @@ async function activityPubCollectionPagination ( | |||
33 | let prev: string | undefined | 34 | let prev: string | undefined |
34 | 35 | ||
35 | // Assert page is a number | 36 | // Assert page is a number |
36 | page = parseInt(page, 10) | 37 | page = forceNumber(page) |
37 | 38 | ||
38 | // There are more results | 39 | // There are more results |
39 | if (result.total > page * size) { | 40 | if (result.total > page * size) { |