Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pleroma
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hakaba Hitoyo
pleroma
Commits
c7617941
Commit
c7617941
authored
Dec 23, 2018
by
Karen Konou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed the things
parent
c92f91ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
config/config.exs
config/config.exs
+1
-1
docs/config.md
docs/config.md
+1
-1
lib/pleroma/web/activity_pub/mrf/hellthread_policy.ex
lib/pleroma/web/activity_pub/mrf/hellthread_policy.ex
+1
-1
No files found.
config/config.exs
View file @
c7617941
...
...
@@ -163,7 +163,7 @@
allow_followersonly:
false
,
allow_direct:
false
config
:pleroma
,
:mrf_hellthread
mitigation
,
threshold:
10
config
:pleroma
,
:mrf_hellthread
,
threshold:
10
config
:pleroma
,
:mrf_simple
,
media_removal:
[],
...
...
docs/config.md
View file @
c7617941
...
...
@@ -121,7 +121,7 @@ This section is used to configure Pleroma-FE, unless ``:managed_config`` in ``:i
*
`allow_followersonly`
: whether to allow followers-only posts
*
`allow_direct`
: whether to allow direct messages
## :mrf_hellthread
mitigation
## :mrf_hellthread
*
`threshold`
: Number of mentioned users after which the message gets discarded as spam
## :media_proxy
...
...
lib/pleroma/web/activity_pub/mrf/hellthread_policy.ex
View file @
c7617941
...
...
@@ -3,7 +3,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.HellthreadPolicy do
@impl
true
def
filter
(
object
)
do
policy
=
Pleroma
.
Config
.
get
(
:mrf_hellthread
mitigation
)
policy
=
Pleroma
.
Config
.
get
(
:mrf_hellthread
)
if
length
(
object
[
"to"
])
+
length
(
object
[
"cc"
])
>
Keyword
.
get
(
policy
,
:threshold
)
do
{
:reject
,
nil
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment