Allow to refresh instance outbox when they accept subscription

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-09-02 08:59:59 +02:00
parent c011a988a8
commit 489fd74545
20 changed files with 427 additions and 227 deletions

View File

@@ -41,7 +41,10 @@ defmodule Mobilizon.Tombstone do
@spec find_tombstone(String.t()) :: Ecto.Schema.t() | nil
def find_tombstone(uri) do
Repo.get_by(__MODULE__, uri: uri)
__MODULE__
|> Ecto.Query.where([t], t.uri == ^uri)
|> Ecto.Query.preload([t], [:actor])
|> Repo.one()
end
@spec delete_actor_tombstones(String.t() | integer()) :: {integer(), nil}