Hide suspended user profile (#5452)

This commit is contained in:
MeiMei
2020-01-02 02:47:20 +09:00
committed by syuilo
parent a3c7901f87
commit 541f5f1314
6 changed files with 40 additions and 11 deletions

View File

@@ -49,7 +49,8 @@ router.get('/.well-known/nodeinfo', async ctx => {
router.get(webFingerPath, async ctx => {
const fromId = (id: User['id']): Record<string, any> => ({
id,
host: null
host: null,
isSuspended: false
});
const generateQuery = (resource: string) =>
@@ -63,7 +64,8 @@ router.get(webFingerPath, async ctx => {
const fromAcct = (acct: Acct): Record<string, any> | number =>
!acct.host || acct.host === config.host.toLowerCase() ? {
usernameLower: acct.username,
host: null
host: null,
isSuspended: false
} : 422;
if (typeof ctx.query.resource !== 'string') {