From 62e7961aea597ab56c964b3b0c18691aa406c19a Mon Sep 17 00:00:00 2001 From: kabo2468 <28654659+kabo2468@users.noreply.github.com> Date: Sat, 2 Mar 2024 04:28:45 +0900 Subject: [PATCH] =?UTF-8?q?fix(backend):=20=E3=83=AA=E3=83=97=E3=83=A9?= =?UTF-8?q?=E3=82=A4=E7=A6=81=E6=AD=A2=E3=83=9D=E3=83=AA=E3=82=B7=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E3=81=A6=E8=87=AA=E5=88=86=E3=81=AB=E3=83=AA=E3=83=97?= =?UTF-8?q?=E3=83=A9=E3=82=A4=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84=E3=81=AE?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3=20(MisskeyIO#495)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/NoteCreateService.ts | 2 +- packages/backend/src/models/json-schema/role.ts | 4 ++++ packages/misskey-js/src/autogen/types.ts | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 6e442451b9..82cd07bc0f 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -383,7 +383,7 @@ export class NoteCreateService implements OnApplicationShutdown { if (policies.canInitiateConversation === false) { if ( mentionedUsers.some(u => u.id !== user.id) - || (data.reply && data.reply.replyUserId !== user.id) + || (data.reply && data.reply.userId !== user.id) || (data.visibility === 'specified' && data.visibleUsers?.some(u => u.id !== user.id)) || (this.isQuote(data) && data.renote.userId !== user.id) ) { diff --git a/packages/backend/src/models/json-schema/role.ts b/packages/backend/src/models/json-schema/role.ts index 035566f4d7..59668d8f7c 100644 --- a/packages/backend/src/models/json-schema/role.ts +++ b/packages/backend/src/models/json-schema/role.ts @@ -140,6 +140,10 @@ export const packedRolePoliciesSchema = { type: 'boolean', optional: false, nullable: false, }, + canInitiateConversation: { + type: 'boolean', + optional: false, nullable: false, + }, canCreateContent: { type: 'boolean', optional: false, nullable: false, diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index 4216568214..65e26e14fb 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -4784,6 +4784,7 @@ export type components = { gtlAvailable: boolean; ltlAvailable: boolean; canPublicNote: boolean; + canInitiateConversation: boolean; canCreateContent: boolean; canUpdateContent: boolean; canDeleteContent: boolean;