Add ability to mute a user/instance by server in server api

This commit is contained in:
Chocobozzz 2018-10-15 13:03:04 +02:00
parent af5767ffae
commit b44164bb56
12 changed files with 1035 additions and 309 deletions

View file

@ -72,8 +72,6 @@ function buildBlockedAccountSQL (serverAccountId: number, userAccountId?: number
const query = 'SELECT "targetAccountId" AS "id" FROM "accountBlocklist" WHERE "accountId" IN (' + blockerIdsString + ')' +
' UNION ALL ' +
// 'SELECT "accountId" FROM "accountBlocklist" WHERE "targetAccountId" = user.account.id
// UNION ALL
'SELECT "account"."id" AS "id" FROM account INNER JOIN "actor" ON account."actorId" = actor.id ' +
'INNER JOIN "serverBlocklist" ON "actor"."serverId" = "serverBlocklist"."targetServerId" ' +
'WHERE "serverBlocklist"."accountId" IN (' + blockerIdsString + ')'