diff options
Diffstat (limited to 'server/lib/activitypub/process/process-create.ts')
-rw-r--r-- | server/lib/activitypub/process/process-create.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/lib/activitypub/process/process-create.ts b/server/lib/activitypub/process/process-create.ts index cff8dcfc6..ceb5413ca 100644 --- a/server/lib/activitypub/process/process-create.ts +++ b/server/lib/activitypub/process/process-create.ts | |||
@@ -95,7 +95,7 @@ async function processCreateView (byActor: ActorModel, activity: ActivityCreate) | |||
95 | if (video.isOwned()) { | 95 | if (video.isOwned()) { |
96 | // Don't resend the activity to the sender | 96 | // Don't resend the activity to the sender |
97 | const exceptions = [ byActor ] | 97 | const exceptions = [ byActor ] |
98 | await forwardActivity(activity, undefined, exceptions) | 98 | await forwardVideoRelatedActivity(activity, undefined, exceptions, video) |
99 | } | 99 | } |
100 | } | 100 | } |
101 | 101 | ||
@@ -104,12 +104,14 @@ async function processCacheFile (byActor: ActorModel, activity: ActivityCreate) | |||
104 | 104 | ||
105 | const { video } = await getOrCreateVideoAndAccountAndChannel({ videoObject: cacheFile.object }) | 105 | const { video } = await getOrCreateVideoAndAccountAndChannel({ videoObject: cacheFile.object }) |
106 | 106 | ||
107 | await createCacheFile(cacheFile, video, byActor) | 107 | await sequelizeTypescript.transaction(async t => { |
108 | return createCacheFile(cacheFile, video, byActor, t) | ||
109 | }) | ||
108 | 110 | ||
109 | if (video.isOwned()) { | 111 | if (video.isOwned()) { |
110 | // Don't resend the activity to the sender | 112 | // Don't resend the activity to the sender |
111 | const exceptions = [ byActor ] | 113 | const exceptions = [ byActor ] |
112 | await forwardActivity(activity, undefined, exceptions) | 114 | await forwardVideoRelatedActivity(activity, undefined, exceptions, video) |
113 | } | 115 | } |
114 | } | 116 | } |
115 | 117 | ||