1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Federate video abuses

This commit is contained in:
Chocobozzz 2017-11-16 17:04:19 +01:00
parent d7d5611c8a
commit 21e0727a84
No known key found for this signature in database
GPG key ID: 583A612D890159BE
7 changed files with 28 additions and 12 deletions

View file

@ -8,7 +8,7 @@ import {
} from '../../models'
import { httpRequestJobScheduler } from '../jobs'
import { signObject, activityPubContextify } from '../../helpers'
import { Activity } from '../../../shared'
import { Activity, VideoAbuseObject } from '../../../shared'
import { VideoAbuseInstance } from '../../models/video/video-abuse-interface'
import { getActivityPubUrl } from '../../helpers/activitypub'
import { logger } from '../../helpers/logger'
@ -96,7 +96,7 @@ async function sendVideoAbuse (
t: Sequelize.Transaction
) {
const url = getActivityPubUrl('videoAbuse', videoAbuse.id.toString())
const data = await createActivityData(url, fromAccount, video.url)
const data = await createActivityData(url, fromAccount, videoAbuse.toActivityPubObject())
return unicastTo(data, video.VideoChannel.Account.sharedInboxUrl, t)
}