mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Correctly forward video related activities
This commit is contained in:
parent
3f9b33b02b
commit
9588d4f49b
6 changed files with 43 additions and 18 deletions
|
@ -4,8 +4,9 @@ import { sequelizeTypescript } from '../../../initializers'
|
|||
import { AccountVideoRateModel } from '../../../models/account/account-video-rate'
|
||||
import { ActorModel } from '../../../models/activitypub/actor'
|
||||
import { getOrCreateActorAndServerAndModel } from '../actor'
|
||||
import { forwardActivity } from '../send/utils'
|
||||
import { forwardActivity, forwardVideoRelatedActivity } from '../send/utils'
|
||||
import { getOrCreateAccountAndVideoAndChannel } from '../videos'
|
||||
import { getActorsInvolvedInVideo } from '../audience'
|
||||
|
||||
async function processLikeActivity (activity: ActivityLike) {
|
||||
const actor = await getOrCreateActorAndServerAndModel(activity.actor)
|
||||
|
@ -54,7 +55,8 @@ async function createVideoLike (byActor: ActorModel, activity: ActivityLike) {
|
|||
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)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue