feat: preserved usernames

Resolve #10704
This commit is contained in:
syuilo
2023-04-29 17:03:14 +09:00
parent e8177ee311
commit 0ad7869249
11 changed files with 68 additions and 6 deletions

View File

@@ -95,6 +95,7 @@ export const paramDef = {
enableChartsForRemoteUser: { type: 'boolean' },
enableChartsForFederatedInstances: { type: 'boolean' },
serverRules: { type: 'array', items: { type: 'string' } },
preservedUsernames: { type: 'array', items: { type: 'string' } },
},
required: [],
} as const;
@@ -392,6 +393,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
set.serverRules = ps.serverRules;
}
if (ps.preservedUsernames !== undefined) {
set.preservedUsernames = ps.preservedUsernames;
}
await this.metaService.update(set);
this.moderationLogService.insertModerationLog(me, 'updateMeta');
});