mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
fix(federation): 🐛 Add missing SQL AND
This commit is contained in:
parent
0eee4a1f20
commit
431bc9c715
|
|
@ -522,8 +522,10 @@ export class User {
|
|||
) {
|
||||
// Get followers
|
||||
const followers = await User.manyFromSql(
|
||||
sql`EXISTS (SELECT 1 FROM "Relationships" WHERE "Relationships"."subjectId" = ${this.id} AND "Relationships"."ownerId" = ${Users.id} AND "Relationships"."following" = true)`,
|
||||
isNotNull(Users.instanceId),
|
||||
and(
|
||||
sql`EXISTS (SELECT 1 FROM "Relationships" WHERE "Relationships"."subjectId" = ${this.id} AND "Relationships"."ownerId" = ${Users.id} AND "Relationships"."following" = true)`,
|
||||
isNotNull(Users.instanceId),
|
||||
),
|
||||
);
|
||||
|
||||
for (const follower of followers) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue