Switch to runtime deps in ActivityPub.SideEffects

Speeds up recompilation by reducing compile cycles
This commit is contained in:
Alex Gleason 2021-06-08 18:18:25 -05:00
parent d896e45faf
commit 67ec0e6c18
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -28,11 +28,12 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
require Logger
@cachex Pleroma.Config.get([:cachex, :provider], Cachex)
@ap_streamer Pleroma.Config.get([:side_effects, :ap_streamer], ActivityPub)
@logger Pleroma.Config.get([:side_effects, :logger], Logger)
@behaviour Pleroma.Web.ActivityPub.SideEffects.Handling
defp ap_streamer, do: Pleroma.Config.get([:side_effects, :ap_streamer], ActivityPub)
@impl true
def handle(object, meta \\ [])
@ -302,8 +303,8 @@ def handle(%{data: %{"type" => "Delete", "object" => deleted_object}} = object,
MessageReference.delete_for_object(deleted_object)
@ap_streamer.stream_out(object)
@ap_streamer.stream_out_participations(deleted_object, user)
ap_streamer().stream_out(object)
ap_streamer().stream_out_participations(deleted_object, user)
:ok
else
{:actor, _} ->