Refactoring of Actors context
This commit is contained in:
@@ -551,7 +551,7 @@ defmodule Mobilizon.Service.ActivityPub do
|
||||
|
||||
followers =
|
||||
if actor.followers_url in activity.recipients do
|
||||
Actors.get_full_external_followers(actor)
|
||||
Actors.list_external_followers_for_actor(actor)
|
||||
else
|
||||
[]
|
||||
end
|
||||
|
||||
@@ -17,7 +17,7 @@ defmodule Mobilizon.Service.ActivityPub.Relay do
|
||||
|
||||
def get_actor do
|
||||
with {:ok, %Actor{} = actor} <-
|
||||
Actors.get_or_create_service_actor_by_url("#{MobilizonWeb.Endpoint.url()}/relay") do
|
||||
Actors.get_or_create_actor_by_url("#{MobilizonWeb.Endpoint.url()}/relay") do
|
||||
actor
|
||||
end
|
||||
end
|
||||
|
||||
@@ -642,7 +642,7 @@ defmodule Mobilizon.Service.ActivityPub.Transmogrifier do
|
||||
defp get_follow(follow_object) do
|
||||
with follow_object_id when not is_nil(follow_object_id) <- Utils.get_url(follow_object),
|
||||
{:not_found, %Follower{} = follow} <-
|
||||
{:not_found, Actors.get_follow_by_url(follow_object_id)} do
|
||||
{:not_found, Actors.get_follower_by_url(follow_object_id)} do
|
||||
{:ok, follow}
|
||||
else
|
||||
{:not_found, _err} ->
|
||||
|
||||
Reference in New Issue
Block a user