X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Faccount%2Faccount.ts;h=61a88524c2d39662557d9ba524450f01b0566981;hb=25ed141c7c7631ef21d8764c1163fbf8a6591391;hp=c721656cbe26ce1885ebfacc42941604ba58f15f;hpb=5cd80545422bba855cc9a730a2e13cc9d982c34b;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/account/account.ts b/server/models/account/account.ts index c721656cb..61a88524c 100644 --- a/server/models/account/account.ts +++ b/server/models/account/account.ts @@ -10,7 +10,6 @@ import { import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' import { CONFIG, CONSTRAINTS_FIELDS } from '../../initializers/constants' import { sendDeleteAccount } from '../../lib/activitypub/send/send-delete' - import { addMethodsToModel } from '../utils' import { AccountAttributes, AccountInstance, AccountMethods } from './account-interface' @@ -315,7 +314,7 @@ isOwned = function (this: AccountInstance) { return this.serverId === null } -getFollowerSharedInboxUrls = function (this: AccountInstance) { +getFollowerSharedInboxUrls = function (this: AccountInstance, t: Sequelize.Transaction) { const query: Sequelize.FindOptions = { attributes: [ 'sharedInboxUrl' ], include: [ @@ -327,7 +326,8 @@ getFollowerSharedInboxUrls = function (this: AccountInstance) { targetAccountId: this.id } } - ] + ], + transaction: t } return Account.findAll(query)