From 381126bdc757c8a43439b41e7e8bf7d551a176c0 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Sat, 22 Mar 2025 10:56:49 +0900 Subject: [PATCH] wip --- locales/index.d.ts | 4 ++++ .../backend/migration/1742608337548-chat-2.js | 18 ++++++++++++++++++ .../src/components/EmPagination.vue | 7 ++++--- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 packages/backend/migration/1742608337548-chat-2.js diff --git a/locales/index.d.ts b/locales/index.d.ts index 94f5179b41..d194382c8c 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -7310,6 +7310,10 @@ export interface Locale extends ILocale { * リストのインポートを許可 */ "canImportUserLists": string; + /** + * チャットを許可 + */ + "canChat": string; }; "_condition": { /** diff --git a/packages/backend/migration/1742608337548-chat-2.js b/packages/backend/migration/1742608337548-chat-2.js new file mode 100644 index 0000000000..9f74a263d6 --- /dev/null +++ b/packages/backend/migration/1742608337548-chat-2.js @@ -0,0 +1,18 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + +export class Chat21742608337548 { + name = 'Chat21742608337548' + + async up(queryRunner) { + await queryRunner.query(`ALTER TABLE "user" ADD "chatScope" character varying(128) NOT NULL DEFAULT 'mutual'`); + await queryRunner.query(`CREATE UNIQUE INDEX "IDX_185b6b5afa707b5d36d1ce3144" ON "chat_room_membership" ("userId", "roomId") `); + } + + async down(queryRunner) { + await queryRunner.query(`DROP INDEX "public"."IDX_185b6b5afa707b5d36d1ce3144"`); + await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "chatScope"`); + } +} diff --git a/packages/frontend-embed/src/components/EmPagination.vue b/packages/frontend-embed/src/components/EmPagination.vue index 5d5317a912..f34f15285a 100644 --- a/packages/frontend-embed/src/components/EmPagination.vue +++ b/packages/frontend-embed/src/components/EmPagination.vue @@ -34,10 +34,11 @@ SPDX-License-Identifier: AGPL-3.0-only