Correctly forward comment deletion

This commit is contained in:
Chocobozzz 2018-10-02 11:33:18 +02:00
parent 53877968a6
commit 659edaa62c
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ import { ActorModel } from '../../../models/activitypub/actor'
import { VideoModel } from '../../../models/video/video' import { VideoModel } from '../../../models/video/video'
import { VideoChannelModel } from '../../../models/video/video-channel' import { VideoChannelModel } from '../../../models/video/video-channel'
import { VideoCommentModel } from '../../../models/video/video-comment' import { VideoCommentModel } from '../../../models/video/video-comment'
import { forwardActivity } from '../send/utils' import { forwardVideoRelatedActivity } from '../send/utils'
async function processDeleteActivity (activity: ActivityDelete, byActor: ActorModel) { async function processDeleteActivity (activity: ActivityDelete, byActor: ActorModel) {
const objectUrl = typeof activity.object === 'string' ? activity.object : activity.object.id const objectUrl = typeof activity.object === 'string' ? activity.object : activity.object.id
@ -103,7 +103,7 @@ function processDeleteVideoComment (byActor: ActorModel, videoComment: VideoComm
if (videoComment.Video.isOwned()) { if (videoComment.Video.isOwned()) {
// Don't resend the activity to the sender // Don't resend the activity to the sender
const exceptions = [ byActor ] const exceptions = [ byActor ]
await forwardActivity(activity, t, exceptions) await forwardVideoRelatedActivity(activity, t, exceptions, videoComment.Video)
} }
logger.info('Remote video comment %s removed.', videoComment.url) logger.info('Remote video comment %s removed.', videoComment.url)