diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-16 15:55:01 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:52 +0100 |
commit | d7d5611c8a23de9b483f0437ad3469afef7b8805 (patch) | |
tree | 35f8f77e5f211a65f8be3c967e939f83c7e17d29 /server/models/account | |
parent | 20494f122186bb1bfd82f4c598c4744acea27b0c (diff) | |
download | PeerTube-d7d5611c8a23de9b483f0437ad3469afef7b8805.tar.gz PeerTube-d7d5611c8a23de9b483f0437ad3469afef7b8805.tar.zst PeerTube-d7d5611c8a23de9b483f0437ad3469afef7b8805.zip |
Federate video update
Diffstat (limited to 'server/models/account')
-rw-r--r-- | server/models/account/account-follow.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/account/account-follow.ts b/server/models/account/account-follow.ts index 8a7474c9d..cc9b7c42b 100644 --- a/server/models/account/account-follow.ts +++ b/server/models/account/account-follow.ts | |||
@@ -187,13 +187,13 @@ async function createListAcceptedFollowForApiQuery ( | |||
187 | let query = 'SELECT ' + selection + ' FROM "Accounts" ' + | 187 | let query = 'SELECT ' + selection + ' FROM "Accounts" ' + |
188 | 'INNER JOIN "AccountFollows" ON "AccountFollows"."' + firstJoin + '" = "Accounts"."id" ' + | 188 | 'INNER JOIN "AccountFollows" ON "AccountFollows"."' + firstJoin + '" = "Accounts"."id" ' + |
189 | 'INNER JOIN "Accounts" AS "Follows" ON "AccountFollows"."' + secondJoin + '" = "Follows"."id" ' + | 189 | 'INNER JOIN "Accounts" AS "Follows" ON "AccountFollows"."' + secondJoin + '" = "Follows"."id" ' + |
190 | 'WHERE "Accounts"."id" IN ($accountIds) AND "AccountFollows"."state" = \'accepted\' ' | 190 | 'WHERE "Accounts"."id" = ANY ($accountIds) AND "AccountFollows"."state" = \'accepted\' ' |
191 | 191 | ||
192 | if (start !== undefined) query += 'LIMIT ' + start | 192 | if (start !== undefined) query += 'LIMIT ' + start |
193 | if (count !== undefined) query += ', ' + count | 193 | if (count !== undefined) query += ', ' + count |
194 | 194 | ||
195 | const options = { | 195 | const options = { |
196 | bind: { accountIds: accountIds.join(',') }, | 196 | bind: { accountIds }, |
197 | type: Sequelize.QueryTypes.SELECT | 197 | type: Sequelize.QueryTypes.SELECT |
198 | } | 198 | } |
199 | tasks.push(AccountFollow['sequelize'].query(query, options)) | 199 | tasks.push(AccountFollow['sequelize'].query(query, options)) |