summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsquidboi <squidboi@waifu.club>2018-06-08 19:01:14 -0700
committersquidboi <squidboi@waifu.club>2018-06-08 19:01:14 -0700
commit16d896f526df0a625f7de115228c9a9b8993ccf3 (patch)
tree0dc83d8e64b309f59cad3b528d75fe1d2b9b2db8
parentb3580b6971ed539c0d979e2b80631d0dc26e04c8 (diff)
downloadpleroma-16d896f526df0a625f7de115228c9a9b8993ccf3.tar.gz
pleroma-16d896f526df0a625f7de115228c9a9b8993ccf3.zip
fixes
-rw-r--r--lib/pleroma/user.ex8
-rw-r--r--lib/pleroma/web/activity_pub/activity_pub.ex4
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex
index 649fe8f6d..5e3096172 100644
--- a/lib/pleroma/user.ex
+++ b/lib/pleroma/user.ex
@@ -169,7 +169,7 @@ defmodule Pleroma.User do
end
@user_config Application.get_env(:pleroma, :user)
- @deny_follow_blocked Keyword.get(@ap_config, :deny_follow_blocked)
+ @deny_follow_blocked Keyword.get(@user_config, :deny_follow_blocked)
def maybe_direct_follow(%User{} = follower, %User{info: info} = followed) do
user_info = user_info(followed)
@@ -181,7 +181,7 @@ defmodule Pleroma.User do
false
# 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
# if OStatus, then there is no three-way handshake to follow
@@ -201,7 +201,7 @@ defmodule Pleroma.User do
end
@user_config Application.get_env(:pleroma, :user)
- @deny_follow_blocked Keyword.get(@ap_config, :deny_follow_blocked)
+ @deny_follow_blocked Keyword.get(@user_config, :deny_follow_blocked)
def follow(%User{} = follower, %User{info: info} = followed) do
ap_followers = followed.follower_address
@@ -210,7 +210,7 @@ defmodule Pleroma.User do
following?(follower, followed) or info["deactivated"] ->
{:error, "Could not follow user: #{followed.nickname} is already on your list."}
- deny_follow_blocked and blocks?(followed, follower) ->
+ @deny_follow_blocked and blocks?(followed, follower) ->
{:error, "Could not follow user: #{followed.nickname} blocked you."}
true ->
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex
index 2f7b12f97..1cf540f0a 100644
--- a/lib/pleroma/web/activity_pub/activity_pub.ex
+++ b/lib/pleroma/web/activity_pub/activity_pub.ex
@@ -246,14 +246,14 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub 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)
if follow_activity do
unfollow(blocker, blocked, nil, local)
end
end
- with true <- outgoing_blocks do
+ with true <- @outgoing_blocks do
with block_data <- make_block_data(blocker, blocked, activity_id),
{:ok, activity} <- insert(block_data, local),
:ok <- maybe_federate(activity) do