ノートをピン留めできる数を設定可能に

Resolve #9555
This commit is contained in:
syuilo 2023-01-14 18:04:56 +09:00
parent 5952f1ac24
commit e46e7f5252
6 changed files with 32 additions and 1 deletions

View file

@ -20,6 +20,7 @@ export type RoleOptions = {
canInvite: boolean;
canManageCustomEmojis: boolean;
driveCapacityMb: number;
pinLimit: number;
antennaLimit: number;
wordMuteLimit: number;
webhookLimit: number;
@ -36,6 +37,7 @@ export const DEFAULT_ROLE: RoleOptions = {
canInvite: false,
canManageCustomEmojis: false,
driveCapacityMb: 100,
pinLimit: 5,
antennaLimit: 5,
wordMuteLimit: 200,
webhookLimit: 3,
@ -211,6 +213,7 @@ export class RoleService implements OnApplicationShutdown {
canInvite: getOptionValues('canInvite').some(x => x === true),
canManageCustomEmojis: getOptionValues('canManageCustomEmojis').some(x => x === true),
driveCapacityMb: Math.max(...getOptionValues('driveCapacityMb')),
pinLimit: Math.max(...getOptionValues('pinLimit')),
antennaLimit: Math.max(...getOptionValues('antennaLimit')),
wordMuteLimit: Math.max(...getOptionValues('wordMuteLimit')),
webhookLimit: Math.max(...getOptionValues('webhookLimit')),