From b2977eecb8eb5d599df0c6a7ab99a437a6a969c7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 3 Aug 2018 17:00:19 +0200 Subject: Fix fps federation --- server/helpers/custom-validators/activitypub/videos.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/helpers/custom-validators') diff --git a/server/helpers/custom-validators/activitypub/videos.ts b/server/helpers/custom-validators/activitypub/videos.ts index c6a350236..b8075f3c7 100644 --- a/server/helpers/custom-validators/activitypub/videos.ts +++ b/server/helpers/custom-validators/activitypub/videos.ts @@ -153,7 +153,8 @@ function isRemoteVideoUrlValid (url: any) { ACTIVITY_PUB.URL_MIME_TYPES.VIDEO.indexOf(url.mimeType) !== -1 && isActivityPubUrlValid(url.href) && validator.isInt(url.width + '', { min: 0 }) && - validator.isInt(url.size + '', { min: 0 }) + validator.isInt(url.size + '', { min: 0 }) && + (!url.fps || validator.isInt(url.fps + '', { min: 0 })) ) || ( ACTIVITY_PUB.URL_MIME_TYPES.TORRENT.indexOf(url.mimeType) !== -1 && -- cgit v1.2.3