Relax activity validation
authorChocobozzz <me@florianbigard.com>
Mon, 13 May 2019 12:51:43 +0000 (14:51 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 13 May 2019 12:51:43 +0000 (14:51 +0200)
server/helpers/custom-validators/activitypub/misc.ts

index f9445929b78bd54eb9e76953c49258aa7c427790..5afcfbedc470f35d182d6a2811215d7b8fb5779d 100644 (file)
@@ -25,8 +25,7 @@ function isActivityPubUrlValid (url: string) {
 }
 
 function isBaseActivityValid (activity: any, type: string) {
-  return (activity['@context'] === undefined || Array.isArray(activity['@context'])) &&
-    activity.type === type &&
+  return activity.type === type &&
     isActivityPubUrlValid(activity.id) &&
     isObjectValid(activity.actor) &&
     isUrlCollectionValid(activity.to) &&