aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorsquidboi <squidboi@waifu.club>2018-06-23 14:27:07 -0700
committersquidboi <squidboi@waifu.club>2018-06-23 14:27:07 -0700
commitf4990283deba2a191e8763a287b5e091fa3c7d05 (patch)
tree5eeb3e47d1bac6034acfc887e0737193e5ecc4dd /lib
parent4e099fcfa9eb03cc281453611fa9224c9c040b26 (diff)
downloadpleroma-f4990283deba2a191e8763a287b5e091fa3c7d05.tar.gz
change moved attributes into normal variables
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/user.ex12
-rw-r--r--lib/pleroma/web/activity_pub/activity_pub.ex10
2 files changed, 11 insertions, 11 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex
index 6000e74fc..a73b0bdf4 100644
--- a/lib/pleroma/user.ex
+++ b/lib/pleroma/user.ex
@@ -169,8 +169,8 @@ defmodule Pleroma.User do
end
def maybe_direct_follow(%User{} = follower, %User{info: info} = followed) do
- @user_config Application.get_env(:pleroma, :user)
- @deny_follow_blocked Keyword.get(@user_config, :deny_follow_blocked)
+ user_config Application.get_env(:pleroma, :user)
+ deny_follow_blocked Keyword.get(user_config, :deny_follow_blocked)
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
+ deny_follow_blocked and
(User.blocks?(follower, followed) or User.blocks?(followed, follower)) ->
false
@@ -210,8 +210,8 @@ defmodule Pleroma.User do
end
def follow(%User{} = follower, %User{info: info} = followed) do
- @user_config Application.get_env(:pleroma, :user)
- @deny_follow_blocked Keyword.get(@user_config, :deny_follow_blocked)
+ user_config Application.get_env(:pleroma, :user)
+ deny_follow_blocked Keyword.get(user_config, :deny_follow_blocked)
ap_followers = followed.follower_address
@@ -219,7 +219,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 b76edbd8b..c9b8961dd 100644
--- a/lib/pleroma/web/activity_pub/activity_pub.ex
+++ b/lib/pleroma/web/activity_pub/activity_pub.ex
@@ -243,11 +243,11 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
end
def block(blocker, blocked, activity_id \\ nil, local \\ true) do
- @ap_config Application.get_env(:pleroma, :activitypub)
- @unfollow_blocked Keyword.get(@ap_config, :unfollow_blocked)
- @outgoing_blocks Keyword.get(@ap_config, :outgoing_blocks)
+ ap_config Application.get_env(:pleroma, :activitypub)
+ unfollow_blocked Keyword.get(ap_config, :unfollow_blocked)
+ outgoing_blocks Keyword.get(ap_config, :outgoing_blocks)
- with true <- @unfollow_blocked do
+ with true <- unfollow_blocked do
follow_activity = fetch_latest_follow(blocker, blocked)
if follow_activity do
@@ -255,7 +255,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
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