console.log(activity)
return isBaseActivityValid(activity, 'Announce') &&
(
- isActivityPubUrlValid(activity.object) ||
- isVideoTorrentCreateActivityValid(activity.object)
+ isVideoTorrentCreateActivityValid(activity.object) ||
+ isActivityPubUrlValid(activity.object)
)
}
isURLOptions.require_tld = false
}
- return exists(url) && validator.isURL(url, isURLOptions) && validator.isLength(url, CONSTRAINTS_FIELDS.ACTOR.URL)
+ return exists(url) && validator.isURL('' + url, isURLOptions) && validator.isLength('' + url, CONSTRAINTS_FIELDS.ACTOR.URL)
}
function isBaseActivityValid (activity: any, type: string) {