]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/activitypub/actor.ts
Add ability to set a name to a channel
[github/Chocobozzz/PeerTube.git] / server / models / activitypub / actor.ts
index 35d7c35e8635bcba7c3c1e3f20b8c05f4cbe5303..2abf4071373ff4504b993fc214a181018f3384c6 100644 (file)
@@ -260,12 +260,13 @@ export class ActorModel extends Model<ActorModel> {
     return ActorModel.scope(ScopeNames.FULL).findAll(query)
   }
 
-  static loadLocalByName (preferredUsername: string) {
+  static loadLocalByName (preferredUsername: string, transaction?: Sequelize.Transaction) {
     const query = {
       where: {
         preferredUsername,
         serverId: null
-      }
+      },
+      transaction
     }
 
     return ActorModel.scope(ScopeNames.FULL).findOne(query)