Split Federator.publish_one/1 into a second function called prepare_one/1

This commit is contained in:
Mark Felder 2024-08-06 11:15:35 -04:00
commit f8bdcaa161
3 changed files with 65 additions and 19 deletions

View file

@ -71,7 +71,10 @@ defmodule Pleroma.Web.Federator do
# Job Worker Callbacks
@spec perform(atom(), any()) :: {:ok, any()} | {:error, any()}
def perform(:publish_one, params), do: Publisher.publish_one(params)
def perform(:publish_one, params) do
Publisher.prepare_one(params)
|> Publisher.publish_one()
end
def perform(:publish, activity) do
Logger.debug(fn -> "Running publish for #{activity.data["id"]}" end)