diff options
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/activitypub/actor.ts | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts index 69c2eca57..f8bb59323 100644 --- a/server/models/activitypub/actor.ts +++ b/server/models/activitypub/actor.ts | |||
@@ -327,6 +327,29 @@ export class ActorModel extends Model<ActorModel> { | |||
327 | where: { | 327 | where: { |
328 | url | 328 | url |
329 | }, | 329 | }, |
330 | transaction, | ||
331 | include: [ | ||
332 | { | ||
333 | attributes: [ 'id' ], | ||
334 | model: AccountModel.unscoped(), | ||
335 | required: false | ||
336 | }, | ||
337 | { | ||
338 | attributes: [ 'id' ], | ||
339 | model: VideoChannelModel.unscoped(), | ||
340 | required: false | ||
341 | } | ||
342 | ] | ||
343 | } | ||
344 | |||
345 | return ActorModel.unscoped().findOne(query) | ||
346 | } | ||
347 | |||
348 | static loadByUrlAndPopulateAccountAndChannel (url: string, transaction?: Sequelize.Transaction) { | ||
349 | const query = { | ||
350 | where: { | ||
351 | url | ||
352 | }, | ||
330 | transaction | 353 | transaction |
331 | } | 354 | } |
332 | 355 | ||