fix(federation): 🐛 Add missing SQL AND

This commit is contained in:
Jesse Wierzbinski 2024-06-05 19:15:10 -10:00
parent 0eee4a1f20
commit 431bc9c715
No known key found for this signature in database

View file

@ -522,8 +522,10 @@ export class User {
) {
// Get followers
const followers = await User.manyFromSql(
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) {