projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'bugfix/ostatus-as2-reflection' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
activity_pub.ex
diff --git
a/lib/pleroma/web/activity_pub/activity_pub.ex
b/lib/pleroma/web/activity_pub/activity_pub.ex
index 48ae36ebd58fb4802d30a9fd498f3d91e01a09ce..c6733e48714060539236be17f06f6885bcbb77c1 100644
(file)
--- a/
lib/pleroma/web/activity_pub/activity_pub.ex
+++ b/
lib/pleroma/web/activity_pub/activity_pub.ex
@@
-10,8
+10,6
@@
defmodule Pleroma.Web.ActivityPub.ActivityPub do
@httpoison Application.get_env(:pleroma, :httpoison)
@httpoison Application.get_env(:pleroma, :httpoison)
- @instance Application.get_env(:pleroma, :instance)
-
# For Announce activities, we filter the recipients based on following status for any actors
# that match actual users. See issue #164 for more information about why this is necessary.
defp get_recipients(%{"type" => "Announce"} = data) do
# For Announce activities, we filter the recipients based on following status for any actors
# that match actual users. See issue #164 for more information about why this is necessary.
defp get_recipients(%{"type" => "Announce"} = data) do
@@
-273,7
+271,7
@@
defmodule Pleroma.Web.ActivityPub.ActivityPub do
"to" => [user.follower_address, "https://www.w3.org/ns/activitystreams#Public"]
}
"to" => [user.follower_address, "https://www.w3.org/ns/activitystreams#Public"]
}
- with Object.delete(object),
+ with
{:ok, _} <-
Object.delete(object),
{:ok, activity} <- insert(data, local),
:ok <- maybe_federate(activity),
{:ok, _actor} <- User.decrease_note_count(user) do
{:ok, activity} <- insert(data, local),
:ok <- maybe_federate(activity),
{:ok, _actor} <- User.decrease_note_count(user) do
@@
-659,14
+657,12
@@
defmodule Pleroma.Web.ActivityPub.ActivityPub do
end
end
end
end
- @quarantined_instances Keyword.get(@instance, :quarantined_instances, [])
-
def should_federate?(inbox, public) do
if public do
true
else
inbox_info = URI.parse(inbox)
def should_federate?(inbox, public) do
if public do
true
else
inbox_info = URI.parse(inbox)
- inbox_info.host not in @quarantined_instances
+ !Enum.member?(Pleroma.Config.get([:instance, :quarantined_instances], []), inbox_info.host)
end
end
end
end