Make sure we can't refresh the local instance

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-04-20 11:35:38 +02:00
parent 28f5cdd03a
commit 409439a916
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -24,6 +24,9 @@ defmodule Mobilizon.Service.Workers.RefreshInstances do
| {:error,
Mobilizon.Federation.ActivityPub.Actor.make_actor_errors()
| Mobilizon.Federation.WebFinger.finger_errors()}
defp refresh_instance_actor(%Instance{domain: nil}) do
{:error, :not_remote_instance}
end
defp refresh_instance_actor(%Instance{domain: domain}) do
ActivityPubActor.find_or_make_actor_from_nickname("relay@#{domain}")