mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-17 18:49:15 +00:00
formatting
This commit is contained in:
parent
8903f1ad4d
commit
4f9ecfc77a
|
@ -62,8 +62,7 @@
|
||||||
unfollow_blocked: true,
|
unfollow_blocked: true,
|
||||||
outgoing_blocks: true
|
outgoing_blocks: true
|
||||||
|
|
||||||
config :pleroma, :user,
|
config :pleroma, :user, deny_follow_blocked: true
|
||||||
deny_follow_blocked: true
|
|
||||||
|
|
||||||
config :pleroma, :mrf_simple,
|
config :pleroma, :mrf_simple,
|
||||||
media_removal: [],
|
media_removal: [],
|
||||||
|
|
|
@ -181,7 +181,8 @@ def maybe_direct_follow(%User{} = follower, %User{info: info} = followed) do
|
||||||
false
|
false
|
||||||
|
|
||||||
# if the users are blocking each other, we shouldn't even be here, but check for it anyway
|
# if the users are blocking each other, we shouldn't even be here, but check for it anyway
|
||||||
@deny_follow_blocked and (User.blocks?(follower, followed) or User.blocks?(followed, follower)) ->
|
@deny_follow_blocked and
|
||||||
|
(User.blocks?(follower, followed) or User.blocks?(followed, follower)) ->
|
||||||
false
|
false
|
||||||
|
|
||||||
# if OStatus, then there is no three-way handshake to follow
|
# if OStatus, then there is no three-way handshake to follow
|
||||||
|
|
|
@ -245,9 +245,9 @@ def delete(%Object{data: %{"id" => id, "actor" => actor}} = object, local \\ tru
|
||||||
@outgoing_blocks Keyword.get(@ap_config, :outgoing_blocks)
|
@outgoing_blocks Keyword.get(@ap_config, :outgoing_blocks)
|
||||||
|
|
||||||
def block(blocker, blocked, activity_id \\ nil, local \\ true) do
|
def block(blocker, blocked, activity_id \\ nil, local \\ true) do
|
||||||
|
|
||||||
with true <- @unfollow_blocked do
|
with true <- @unfollow_blocked do
|
||||||
follow_activity = fetch_latest_follow(blocker, blocked)
|
follow_activity = fetch_latest_follow(blocker, blocked)
|
||||||
|
|
||||||
if follow_activity do
|
if follow_activity do
|
||||||
unfollow(blocker, blocked, nil, local)
|
unfollow(blocker, blocked, nil, local)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue