Don't sign fetches to instance actor when refreshing their keys

Closes #963

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-11-29 10:29:26 +01:00
parent 07d679c4ab
commit 1bfff235f3
4 changed files with 17 additions and 14 deletions

View File

@@ -210,7 +210,8 @@ defmodule Mobilizon.Federation.ActivityPub.Transmogrifier do
def handle_incoming(
%{"type" => "Follow", "object" => followed, "actor" => follower, "id" => id} = _data
) do
with {:ok, %Actor{} = followed} <- ActivityPubActor.get_or_fetch_actor_by_url(followed, true),
with {:ok, %Actor{} = followed} <-
ActivityPubActor.get_or_fetch_actor_by_url(followed, preload: true),
{:ok, %Actor{} = follower} <- ActivityPubActor.get_or_fetch_actor_by_url(follower),
{:ok, activity, object} <-
Actions.Follow.follow(follower, followed, id, false) do