]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/actor/actor.ts
Update changelog
[github/Chocobozzz/PeerTube.git] / server / models / actor / actor.ts
index 0cd30f5451ad693ea8d65746c5db0b5cee4d22ab..c12dcf63408baade6dc126da947f62b06d6f1d3f 100644 (file)
@@ -16,9 +16,9 @@ import {
   Table,
   UpdatedAt
 } from 'sequelize-typescript'
-import { getLowercaseExtension } from '@server/helpers/core-utils'
 import { ModelCache } from '@server/models/model-cache'
-import { AttributesOnly } from '@shared/core-utils'
+import { getLowercaseExtension } from '@shared/core-utils'
+import { AttributesOnly } from '@shared/typescript-utils'
 import { ActivityIconObject, ActivityPubActorType } from '../../../shared/models/activitypub'
 import { ActorImage } from '../../../shared/models/actors/actor-image.model'
 import { activityPubContextify } from '../../helpers/activitypub'
@@ -496,7 +496,7 @@ export class ActorModel extends Model<Partial<AttributesOnly<ActorModel>>> {
     }, { where, transaction })
   }
 
-  static loadAccountActorByVideoId (videoId: number): Promise<MActor> {
+  static loadAccountActorByVideoId (videoId: number, transaction: Transaction): Promise<MActor> {
     const query = {
       include: [
         {
@@ -520,7 +520,8 @@ export class ActorModel extends Model<Partial<AttributesOnly<ActorModel>>> {
             }
           ]
         }
-      ]
+      ],
+      transaction
     }
 
     return ActorModel.unscoped().findOne(query)