Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix video update transaction

Chocobozzz597f771f3f2b
diff --git a/server/controllers/api/videos/update.ts b/server/controllers/api/videos/update.ts
index fab1c22684..a0aa13d71c 100644
--- a/server/controllers/api/videos/update.ts
+++ b/server/controllers/api/videos/update.ts
@@ -104,7 +104,7 @@ export async function updateVideo (req: express.Request, res: express.Response)
// Force updatedAt attribute change
if (!video.changed()) {
- await video.setAsRefreshed()
+ await video.setAsRefreshed(t)
}
const videoInstanceUpdated = await video.save(sequelizeOptions) as MVideoFullLight
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index ba4cf541b4..003741da0c 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -1754,8 +1754,8 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> {
return this.hasPrivacyForFederation() === false && isPrivacyForFederation(newPrivacy) === true
}
- setAsRefreshed () {
- return setAsUpdated('video', this.id)
+ setAsRefreshed (transaction?: Transaction) {
+ return setAsUpdated('video', this.id, transaction)
}
requiresAuth () {