diff options
author | Chocobozzz <me@florianbigard.com> | 2018-05-31 10:23:56 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-31 10:23:56 +0200 |
commit | 9588d4f49b7183631ddb97fa9c3cd79f9bfe2945 (patch) | |
tree | cbd0353ddc0129afa2c8827f27c0665c5c127225 /server/lib/activitypub/process/process-like.ts | |
parent | 3f9b33b02bed9e02af5520394e09805c46716101 (diff) | |
download | PeerTube-9588d4f49b7183631ddb97fa9c3cd79f9bfe2945.tar.gz PeerTube-9588d4f49b7183631ddb97fa9c3cd79f9bfe2945.tar.zst PeerTube-9588d4f49b7183631ddb97fa9c3cd79f9bfe2945.zip |
Correctly forward video related activities
Diffstat (limited to 'server/lib/activitypub/process/process-like.ts')
-rw-r--r-- | server/lib/activitypub/process/process-like.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/lib/activitypub/process/process-like.ts b/server/lib/activitypub/process/process-like.ts index d219e76eb..f1642f038 100644 --- a/server/lib/activitypub/process/process-like.ts +++ b/server/lib/activitypub/process/process-like.ts | |||
@@ -4,8 +4,9 @@ import { sequelizeTypescript } from '../../../initializers' | |||
4 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' | 4 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' |
5 | import { ActorModel } from '../../../models/activitypub/actor' | 5 | import { ActorModel } from '../../../models/activitypub/actor' |
6 | import { getOrCreateActorAndServerAndModel } from '../actor' | 6 | import { getOrCreateActorAndServerAndModel } from '../actor' |
7 | import { forwardActivity } from '../send/utils' | 7 | import { forwardActivity, forwardVideoRelatedActivity } from '../send/utils' |
8 | import { getOrCreateAccountAndVideoAndChannel } from '../videos' | 8 | import { getOrCreateAccountAndVideoAndChannel } from '../videos' |
9 | import { getActorsInvolvedInVideo } from '../audience' | ||
9 | 10 | ||
10 | async function processLikeActivity (activity: ActivityLike) { | 11 | async function processLikeActivity (activity: ActivityLike) { |
11 | const actor = await getOrCreateActorAndServerAndModel(activity.actor) | 12 | const actor = await getOrCreateActorAndServerAndModel(activity.actor) |
@@ -54,7 +55,8 @@ async function createVideoLike (byActor: ActorModel, activity: ActivityLike) { | |||
54 | if (video.isOwned() && created === true) { | 55 | if (video.isOwned() && created === true) { |
55 | // Don't resend the activity to the sender | 56 | // Don't resend the activity to the sender |
56 | const exceptions = [ byActor ] | 57 | const exceptions = [ byActor ] |
57 | await forwardActivity(activity, t, exceptions) | 58 | |
59 | await forwardVideoRelatedActivity(activity, t, exceptions, video) | ||
58 | } | 60 | } |
59 | }) | 61 | }) |
60 | } | 62 | } |