mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +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
|
@ -5,7 +5,7 @@ import { ActorModel } from '../../../models/activitypub/actor'
|
|||
import { VideoModel } from '../../../models/video/video'
|
||||
import { VideoShareModel } from '../../../models/video/video-share'
|
||||
import { getOrCreateActorAndServerAndModel } from '../actor'
|
||||
import { forwardActivity } from '../send/utils'
|
||||
import { forwardVideoRelatedActivity } from '../send/utils'
|
||||
import { getOrCreateAccountAndVideoAndChannel } from '../videos'
|
||||
|
||||
async function processAnnounceActivity (activity: ActivityAnnounce) {
|
||||
|
@ -58,7 +58,8 @@ async function shareVideo (actorAnnouncer: ActorModel, activity: ActivityAnnounc
|
|||
if (video.isOwned() && created === true) {
|
||||
// Don't resend the activity to the sender
|
||||
const exceptions = [ actorAnnouncer ]
|
||||
await forwardActivity(activity, t, exceptions)
|
||||
|
||||
await forwardVideoRelatedActivity(activity, t, exceptions, video)
|
||||
}
|
||||
|
||||
return undefined
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue