mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-21 21:45:11 +00:00
parent
632af91878
commit
93230815f5
3 changed files with 2 additions and 16 deletions
|
@ -28,6 +28,7 @@
|
|||
- ActivityPub: not reacted な Undo.Like がinboxに滞留するのを修正
|
||||
|
||||
### Changes
|
||||
- 連合の考慮に問題があることなどが分かったため、モデレーターをブロックできない仕様を廃止しました
|
||||
- データベースにログを保存しないようになりました
|
||||
- ログを永続化したい場合はsyslogを利用してください
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue