change moved attributes into normal variables
This commit is contained in:
parent
4e099fcfa9
commit
f4990283de
2 changed files with 11 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue