summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/RoleService.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/backend/src/core/RoleService.ts')
-rw-r--r--packages/backend/src/core/RoleService.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/backend/src/core/RoleService.ts b/packages/backend/src/core/RoleService.ts
index 64f7539031..5651b04ac2 100644
--- a/packages/backend/src/core/RoleService.ts
+++ b/packages/backend/src/core/RoleService.ts
@@ -36,6 +36,7 @@ export type RolePolicies = {
ltlAvailable: boolean;
btlAvailable: boolean;
canPublicNote: boolean;
+ scheduleNoteMax: number;
mentionLimit: number;
canInvite: boolean;
inviteLimit: number;
@@ -72,6 +73,7 @@ export const DEFAULT_POLICIES: RolePolicies = {
ltlAvailable: true,
btlAvailable: false,
canPublicNote: true,
+ scheduleNoteMax: 5,
mentionLimit: 20,
canInvite: false,
inviteLimit: 0,
@@ -377,6 +379,7 @@ export class RoleService implements OnApplicationShutdown, OnModuleInit {
btlAvailable: calc('btlAvailable', vs => vs.some(v => v === true)),
ltlAvailable: calc('ltlAvailable', vs => vs.some(v => v === true)),
canPublicNote: calc('canPublicNote', vs => vs.some(v => v === true)),
+ scheduleNoteMax: calc('scheduleNoteMax', vs => Math.max(...vs)),
mentionLimit: calc('mentionLimit', vs => Math.max(...vs)),
canInvite: calc('canInvite', vs => vs.some(v => v === true)),
inviteLimit: calc('inviteLimit', vs => Math.max(...vs)),