diff options
author | lain <lain@soykaf.club> | 2019-08-27 12:22:30 -0500 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-08-27 12:22:30 -0500 |
commit | c30cc039e423e8f31d0222747e301514b7d0dd9e (patch) | |
tree | b044e0d02550177e5241937915ccd250860fcb01 /lib/pleroma/web | |
parent | 3da65292b389c1f1edeff03fd5097579721fb681 (diff) | |
download | pleroma-c30cc039e423e8f31d0222747e301514b7d0dd9e.tar.gz |
Transmogrifier: Use Containment.get_actor to get actors.
Diffstat (limited to 'lib/pleroma/web')
-rw-r--r-- | lib/pleroma/web/activity_pub/transmogrifier.ex | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex index 6c4259c02..468961bd0 100644 --- a/lib/pleroma/web/activity_pub/transmogrifier.ex +++ b/lib/pleroma/web/activity_pub/transmogrifier.ex @@ -464,8 +464,10 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do %{"type" => "Follow", "object" => followed, "actor" => follower, "id" => id} = data, _options ) do - with %User{local: true} = followed <- User.get_cached_by_ap_id(Object.get_ap_id(followed)), - {:ok, %User{} = follower} <- User.get_or_fetch_by_ap_id(Object.get_ap_id(follower)), + with %User{local: true} = followed <- + User.get_cached_by_ap_id(Containment.get_actor(%{"actor" => followed})), + {:ok, %User{} = follower} <- + User.get_or_fetch_by_ap_id(Containment.get_actor(%{"actor" => follower})), {:ok, activity} <- ActivityPub.follow(follower, followed, id, false) do with deny_follow_blocked <- Pleroma.Config.get([:user, :deny_follow_blocked]), {_, false} <- {:user_blocked, User.blocks?(followed, follower) && deny_follow_blocked}, |