fix buggos
[akkoma] / lib / pleroma / web / activity_pub / side_effects.ex
index 913b664ca94c22ef99bfec70fc53bfeeda52f4ee..91e9c72e03b408867cb3b3f995a6da57638f6aa0 100644 (file)
@@ -537,9 +537,16 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
   end
 
   @impl true
-  @impl true
-  def handle_after_transaction(%{data: %{"type" => "Create"}} = activity) do
-    Elasticsearch.put_by_id(activity.id)
+  def handle_after_transaction(%Pleroma.Activity{data: %{"type" => "Create"}} = activity) do
+    Pleroma.Elasticsearch.put_by_id(activity.id)
+  end
+
+  def handle_after_transaction(%Pleroma.Activity{}) do
+    :ok
+  end
+
+  def handle_after_transaction(%Pleroma.Object{}) do
+    :ok
   end
 
   def handle_after_transaction(meta) do
@@ -547,6 +554,4 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
     |> send_notifications()
     |> send_streamables()
   end
-
-  def handle_after_transaction(_), do: :ok
 end