projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
parsers configurable
[akkoma]
/
lib
/
pleroma
/
web
/
federator
/
federator.ex
diff --git
a/lib/pleroma/web/federator/federator.ex
b/lib/pleroma/web/federator/federator.ex
index 7c13ff32314b259c81e80121e64955cb09bbdd4b..f4f9e83e06ab55f71b715301631865bc46b11c00 100644
(file)
--- a/
lib/pleroma/web/federator/federator.ex
+++ b/
lib/pleroma/web/federator/federator.ex
@@
-22,11
+22,17
@@
defmodule Pleroma.Web.Federator do
refresh_subscriptions()
end
refresh_subscriptions()
end
- @max_replies_depth 100
-
@doc "Addresses [memory leaks on recursive replies fetching](https://git.pleroma.social/pleroma/pleroma/issues/161)"
# credo:disable-for-previous-line Credo.Check.Readability.MaxLineLength
@doc "Addresses [memory leaks on recursive replies fetching](https://git.pleroma.social/pleroma/pleroma/issues/161)"
# credo:disable-for-previous-line Credo.Check.Readability.MaxLineLength
- def max_replies_depth, do: @max_replies_depth
+ def allowed_incoming_reply_depth?(depth) do
+ max_replies_depth = Pleroma.Config.get([:instance, :federation_incoming_replies_max_depth])
+
+ if max_replies_depth do
+ (depth || 1) <= max_replies_depth
+ else
+ true
+ end
+ end
# Client API
# Client API