+ {:ok, activity}
+ else
+ error -> format_error(error)
+ end
+ end
+
+ @spec publish(any()) :: {:ok, Activity.t(), Object.t()} | {:error, any()}
+ def publish(%Activity{data: %{"type" => "Create"}} = activity) do
+ with %User{} = user <- get_actor(),
+ %Object{} = object <- Object.normalize(activity) do
+ ActivityPub.announce(user, object, nil, true, false)