1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00
This commit is contained in:
Chocobozzz 2018-06-13 14:55:18 +02:00
parent 90d4bb8125
commit bcec136ee6
No known key found for this signature in database
GPG key ID: 583A612D890159BE
2 changed files with 4 additions and 2 deletions

View file

@ -16,6 +16,7 @@ import {
sanitizeAndCheckVideoTorrentUpdateActivity
} from './videos'
import { isViewActivityValid } from './view'
import { exists } from '../misc'
function isRootActivityValid (activity: any) {
return Array.isArray(activity['@context']) && (
@ -26,6 +27,7 @@ function isRootActivityValid (activity: any) {
) ||
(
isActivityPubUrlValid(activity.id) &&
exists(activity.actor) &&
(isActivityPubUrlValid(activity.actor) || isActivityPubUrlValid(activity.actor.id))
)
)