aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account/account.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-30 11:31:15 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-30 11:31:15 +0100
commit25ed141c7c7631ef21d8764c1163fbf8a6591391 (patch)
tree8f556181a3369e7e4938d612d91be0af813e5067 /server/models/account/account.ts
parent5cd80545422bba855cc9a730a2e13cc9d982c34b (diff)
downloadPeerTube-25ed141c7c7631ef21d8764c1163fbf8a6591391.tar.gz
PeerTube-25ed141c7c7631ef21d8764c1163fbf8a6591391.tar.zst
PeerTube-25ed141c7c7631ef21d8764c1163fbf8a6591391.zip
Put activity pub sends inside transactions
Diffstat (limited to 'server/models/account/account.ts')
-rw-r--r--server/models/account/account.ts6
1 files changed, 3 insertions, 3 deletions
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 {
10import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' 10import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
11import { CONFIG, CONSTRAINTS_FIELDS } from '../../initializers/constants' 11import { CONFIG, CONSTRAINTS_FIELDS } from '../../initializers/constants'
12import { sendDeleteAccount } from '../../lib/activitypub/send/send-delete' 12import { sendDeleteAccount } from '../../lib/activitypub/send/send-delete'
13
14import { addMethodsToModel } from '../utils' 13import { addMethodsToModel } from '../utils'
15import { AccountAttributes, AccountInstance, AccountMethods } from './account-interface' 14import { AccountAttributes, AccountInstance, AccountMethods } from './account-interface'
16 15
@@ -315,7 +314,7 @@ isOwned = function (this: AccountInstance) {
315 return this.serverId === null 314 return this.serverId === null
316} 315}
317 316
318getFollowerSharedInboxUrls = function (this: AccountInstance) { 317getFollowerSharedInboxUrls = function (this: AccountInstance, t: Sequelize.Transaction) {
319 const query: Sequelize.FindOptions<AccountAttributes> = { 318 const query: Sequelize.FindOptions<AccountAttributes> = {
320 attributes: [ 'sharedInboxUrl' ], 319 attributes: [ 'sharedInboxUrl' ],
321 include: [ 320 include: [
@@ -327,7 +326,8 @@ getFollowerSharedInboxUrls = function (this: AccountInstance) {
327 targetAccountId: this.id 326 targetAccountId: this.id
328 } 327 }
329 } 328 }
330 ] 329 ],
330 transaction: t
331 } 331 }
332 332
333 return Account.findAll(query) 333 return Account.findAll(query)