1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-23 14:46:40 +09:00

fix(backend): リプライ禁止ポリシーにて自分にリプライできないのを修正 (MisskeyIO#495)

This commit is contained in:
kabo2468 2024-03-02 04:28:45 +09:00 committed by GitHub
parent f4348af944
commit 62e7961aea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 1 deletions

View File

@ -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)
) {

View File

@ -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,

View File

@ -4784,6 +4784,7 @@ export type components = {
gtlAvailable: boolean;
ltlAvailable: boolean;
canPublicNote: boolean;
canInitiateConversation: boolean;
canCreateContent: boolean;
canUpdateContent: boolean;
canDeleteContent: boolean;