Refactor the ActivityPub module

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-04-22 12:17:56 +02:00
parent 17a6a6eada
commit 280f461ba7
32 changed files with 385 additions and 332 deletions

View File

@@ -10,6 +10,7 @@ defmodule Mobilizon.GraphQL.API.Search do
alias Mobilizon.Storage.Page
alias Mobilizon.Federation.ActivityPub
alias Mobilizon.Federation.ActivityPub.Actor, as: ActivityPubActor
require Logger
@@ -92,7 +93,7 @@ defmodule Mobilizon.GraphQL.API.Search do
# If the search string is an username
@spec process_from_username(String.t()) :: Page.t()
defp process_from_username(search) do
case ActivityPub.find_or_make_actor_from_nickname(search) do
case ActivityPubActor.find_or_make_actor_from_nickname(search) do
{:ok, actor} ->
%Page{total: 1, elements: [actor]}