import { VideoAbuseModel } from '../../../models/video/video-abuse'
import { VideoCommentModel } from '../../../models/video/video-comment'
import { getOrCreateActorAndServerAndModel } from '../actor'
-import { forwardActivity, getActorsInvolvedInVideo } from '../send/misc'
import { resolveThread } from '../video-comments'
import { getOrCreateAccountAndVideoAndChannel } from '../videos'
+import { forwardActivity, forwardVideoRelatedActivity } from '../send/utils'
async function processCreateActivity (activity: ActivityCreate) {
const activityObject = activity.object
if (video.isOwned() && created === true) {
// Don't resend the activity to the sender
const exceptions = [ byActor ]
- await forwardActivity(activity, t, exceptions)
+
+ await forwardVideoRelatedActivity(activity, t, exceptions, video)
}
})
}
// Don't resend the activity to the sender
const exceptions = [ byActor ]
- // Mastodon does not add our announces in audience, so we forward to them manually
- const additionalActors = await getActorsInvolvedInVideo(video, t)
- const additionalFollowerUrls = additionalActors.map(a => a.followersUrl)
-
- await forwardActivity(activity, t, exceptions, additionalFollowerUrls)
+ await forwardVideoRelatedActivity(activity, t, exceptions, video)
}
})
}