Refactor Core things, including Ecto handling, ActivityPub & Transmogrifier modules
* Data doesn't need anymore to be converted to ActivityStream format to be saved (this was taken from Pleroma and not at all a good idea here) * Everything saved when creating an event is inserted into PostgreSQL in a single transaction
This commit is contained in:
@@ -88,7 +88,10 @@ defmodule Mobilizon.Actors do
|
||||
"""
|
||||
@spec get_actor_by_url(String.t(), boolean) ::
|
||||
{:ok, Actor.t()} | {:error, :actor_not_found}
|
||||
def get_actor_by_url(url, preload \\ false) do
|
||||
def get_actor_by_url(url, preload \\ false)
|
||||
def get_actor_by_url(nil, _preload), do: {:error, :actor_not_found}
|
||||
|
||||
def get_actor_by_url(url, preload) do
|
||||
case Repo.get_by(Actor, url: url) do
|
||||
nil ->
|
||||
{:error, :actor_not_found}
|
||||
|
||||
Reference in New Issue
Block a user