Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dima Krasner
Sharkey
Commits
93230815
Commit
93230815
authored
3 years ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
モデレーターをブロックできない仕様を廃止
Resolve #7898
parent
632af918
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
src/server/api/endpoints/blocking/create.ts
+1
-12
1 addition, 12 deletions
src/server/api/endpoints/blocking/create.ts
src/services/blocking/create.ts
+0
-4
0 additions, 4 deletions
src/services/blocking/create.ts
with
2 additions
and
16 deletions
CHANGELOG.md
+
1
−
0
View file @
93230815
...
...
@@ -28,6 +28,7 @@
-
ActivityPub: not reacted な Undo.Like がinboxに滞留するのを修正
### Changes
-
連合の考慮に問題があることなどが分かったため、モデレーターをブロックできない仕様を廃止しました
-
データベースにログを保存しないようになりました
-
ログを永続化したい場合はsyslogを利用してください
...
...
This diff is collapsed.
Click to expand it.
src/server/api/endpoints/blocking/create.ts
+
1
−
12
View file @
93230815
...
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
src/services/blocking/create.ts
+
0
−
4
View file @
93230815
...
...
@@ -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
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment