diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a67411848..244ceb3826 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ - ActivityPub: not reacted な Undo.Like がinboxに滞留するのを修正 ### Changes +- 連合の考慮に問題があることなどが分かったため、モデレーターをブロックできない仕様を廃止しました - データベースにログを保存しないようになりました - ログを永続化したい場合はsyslogを利用してください diff --git a/src/server/api/endpoints/blocking/create.ts b/src/server/api/endpoints/blocking/create.ts index 4deaa39974..2953252394 100644 --- a/src/server/api/endpoints/blocking/create.ts +++ b/src/server/api/endpoints/blocking/create.ts @@ -43,12 +43,6 @@ export const meta = { code: 'ALREADY_BLOCKING', id: '787fed64-acb9-464a-82eb-afbd745b9614' }, - - cannotBlockModerator: { - message: 'Cannot block a moderator or an admin.', - code: 'CANNOT_BLOCK_MODERATOR', - id: '8544aaef-89fb-e470-9f6c-385d38b474f5' - } }, res: { @@ -82,12 +76,7 @@ export default define(meta, async (ps, user) => { throw new ApiError(meta.errors.alreadyBlocking); } - try { - await create(blocker, blockee); - } catch (e) { - if (e.id === 'e42b7890-5e4d-9d9c-d54b-cf4dd30adfb5') throw new ApiError(meta.errors.cannotBlockModerator); - throw e; - } + await create(blocker, blockee); NoteWatchings.delete({ userId: blocker.id, diff --git a/src/services/blocking/create.ts b/src/services/blocking/create.ts index defe377514..6aadc847a9 100644 --- a/src/services/blocking/create.ts +++ b/src/services/blocking/create.ts @@ -12,10 +12,6 @@ import { genId } from '@/misc/gen-id'; import { IdentifiableError } from '@/misc/identifiable-error'; export default async function(blocker: User, blockee: User) { - if (blockee.isAdmin || blockee.isModerator) { - throw new IdentifiableError('e42b7890-5e4d-9d9c-d54b-cf4dd30adfb5'); - } - await Promise.all([ cancelRequest(blocker, blockee), cancelRequest(blockee, blocker),