- unify ChatConfigService setters into generic setPermission method - replace PermissionService switch statements with data-driven checkers map - deduplicate config.ts callback handlers via loop-based registration (414→254 lines) - extract shared updateChatCommands utility from role-add/role-delete - add proper generics to chunk utility, fix mention loop indexing - extract isHiddenAdmin helper and ANONYMOUS_ADMIN_ID constant in perms - remove debug console.logs, standardize arrow exports and type imports - add roleAdminPermission schema and migration
2 lines
No EOL
234 B
SQL
2 lines
No EOL
234 B
SQL
CREATE TYPE "public"."role_admin_permission" AS ENUM('everyone', 'all_admins', 'only_owner');--> statement-breakpoint
|
|
ALTER TABLE "chat_configs" ADD COLUMN "role_admin_permission" "role_admin_permission" DEFAULT 'all_admins' NOT NULL; |