
For now we Create these activities, but we should just send them directly. This fix handles correctly direct Dislikes/Flags/Views, we'll implement the sending correctly these activities in the next peertube version
14 lines
398 B
TypeScript
14 lines
398 B
TypeScript
import { isActivityPubUrlValid } from './misc'
|
|
import { isVideoAbuseReasonValid } from '../video-abuses'
|
|
|
|
function isFlagActivityValid (activity: any) {
|
|
return activity.type === 'Flag' &&
|
|
isVideoAbuseReasonValid(activity.content) &&
|
|
isActivityPubUrlValid(activity.object)
|
|
}
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export {
|
|
isFlagActivityValid
|
|
}
|