Expose proxyAccountName (#6670)

This commit is contained in:
MeiMei
2020-08-29 08:56:32 +09:00
committed by GitHub
parent 5864b52a81
commit c2d7929391
4 changed files with 16 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
import * as Router from '@koa/router';
import config from '../config';
import { fetchMeta } from '../misc/fetch-meta';
import { Users } from '../models';
// import User from '../models/user';
// import Note from '../models/note';
@@ -34,6 +35,8 @@ const nodeinfo2 = async () => {
// Note.count({ '_user.host': null, replyId: { $ne: null } })
]);
const proxyAccount = meta.proxyAccountId ? await Users.pack(meta.proxyAccountId).catch(() => null) : null;
return {
software: {
name: 'misskey',
@@ -72,7 +75,8 @@ const nodeinfo2 = async () => {
enableGithubIntegration: meta.enableGithubIntegration,
enableDiscordIntegration: meta.enableDiscordIntegration,
enableEmail: meta.enableEmail,
enableServiceWorker: meta.enableServiceWorker
enableServiceWorker: meta.enableServiceWorker,
proxyAccountName: proxyAccount ? proxyAccount.username : null,
}
};
};