diff options
Diffstat (limited to 'server/models/account/account-follow.ts')
-rw-r--r-- | server/models/account/account-follow.ts | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/server/models/account/account-follow.ts b/server/models/account/account-follow.ts index cc9b7c42b..f00c7dcd9 100644 --- a/server/models/account/account-follow.ts +++ b/server/models/account/account-follow.ts | |||
@@ -78,7 +78,19 @@ loadByAccountAndTarget = function (accountId: number, targetAccountId: number) { | |||
78 | where: { | 78 | where: { |
79 | accountId, | 79 | accountId, |
80 | targetAccountId | 80 | targetAccountId |
81 | } | 81 | }, |
82 | include: [ | ||
83 | { | ||
84 | model: AccountFollow[ 'sequelize' ].models.Account, | ||
85 | required: true, | ||
86 | as: 'AccountFollower' | ||
87 | }, | ||
88 | { | ||
89 | model: AccountFollow['sequelize'].models.Account, | ||
90 | required: true, | ||
91 | as: 'AccountFollowing' | ||
92 | } | ||
93 | ] | ||
82 | } | 94 | } |
83 | 95 | ||
84 | return AccountFollow.findOne(query) | 96 | return AccountFollow.findOne(query) |