Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
409ff60b
Commit
409ff60b
authored
Dec 22, 2018
by
Karen Konou
Browse files
Fix formatting
parent
92362e1e
Pipeline
#5639
passed with stages
in 8 minutes and 21 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
config/config.exs
View file @
409ff60b
...
...
@@ -163,7 +163,7 @@
allow_followersonly:
false
,
allow_direct:
false
config
:pleroma
,
:mrf_hellthreadmitigation
,
threshold:
10
config
:pleroma
,
:mrf_hellthreadmitigation
,
threshold:
10
config
:pleroma
,
:mrf_simple
,
media_removal:
[],
...
...
lib/pleroma/web/activity_pub/mrf/hellthread_policy.ex
View file @
409ff60b
...
...
@@ -3,13 +3,12 @@ defmodule Pleroma.Web.ActivityPub.MRF.HellthreadPolicy do
@impl
true
def
filter
(
object
)
do
policy
=
Pleroma
.
Config
.
get
(
:mrf_hellthreadmitigation
)
if
(
length
(
object
[
"to"
])
+
length
(
object
[
"cc"
])
)
>
Keyword
.
get
(
policy
,
:threshold
)
do
if
length
(
object
[
"to"
])
+
length
(
object
[
"cc"
])
>
Keyword
.
get
(
policy
,
:threshold
)
do
{
:reject
,
nil
}
else
{
:ok
,
object
}
end
end
end
\ No newline at end of file
end
Write
Preview
Supports
Markdown
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