aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/activitypub
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/activitypub')
-rw-r--r--server/controllers/activitypub/inbox.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/activitypub/inbox.ts b/server/controllers/activitypub/inbox.ts
index 3b8fb34a8..c5edf86b7 100644
--- a/server/controllers/activitypub/inbox.ts
+++ b/server/controllers/activitypub/inbox.ts
@@ -56,9 +56,9 @@ function inboxController (req: express.Request, res: express.Response) {
56 const rootActivity: RootActivity = req.body 56 const rootActivity: RootActivity = req.body
57 let activities: Activity[] 57 let activities: Activity[]
58 58
59 if ([ 'Collection', 'CollectionPage' ].indexOf(rootActivity.type) !== -1) { 59 if ([ 'Collection', 'CollectionPage' ].includes(rootActivity.type)) {
60 activities = (rootActivity as ActivityPubCollection).items 60 activities = (rootActivity as ActivityPubCollection).items
61 } else if ([ 'OrderedCollection', 'OrderedCollectionPage' ].indexOf(rootActivity.type) !== -1) { 61 } else if ([ 'OrderedCollection', 'OrderedCollectionPage' ].includes(rootActivity.type)) {
62 activities = (rootActivity as ActivityPubOrderedCollection<Activity>).orderedItems 62 activities = (rootActivity as ActivityPubOrderedCollection<Activity>).orderedItems
63 } else { 63 } else {
64 activities = [ rootActivity as Activity ] 64 activities = [ rootActivity as Activity ]