diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-30 11:31:15 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-30 11:31:15 +0100 |
commit | 25ed141c7c7631ef21d8764c1163fbf8a6591391 (patch) | |
tree | 8f556181a3369e7e4938d612d91be0af813e5067 /server/models/account/account.ts | |
parent | 5cd80545422bba855cc9a730a2e13cc9d982c34b (diff) | |
download | PeerTube-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.ts | 6 |
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 { | |||
10 | import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' | 10 | import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' |
11 | import { CONFIG, CONSTRAINTS_FIELDS } from '../../initializers/constants' | 11 | import { CONFIG, CONSTRAINTS_FIELDS } from '../../initializers/constants' |
12 | import { sendDeleteAccount } from '../../lib/activitypub/send/send-delete' | 12 | import { sendDeleteAccount } from '../../lib/activitypub/send/send-delete' |
13 | |||
14 | import { addMethodsToModel } from '../utils' | 13 | import { addMethodsToModel } from '../utils' |
15 | import { AccountAttributes, AccountInstance, AccountMethods } from './account-interface' | 14 | import { 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 | ||
318 | getFollowerSharedInboxUrls = function (this: AccountInstance) { | 317 | getFollowerSharedInboxUrls = 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) |