Merge branch 'develop' into global-status-expiration
[akkoma] / lib / pleroma / web / activity_pub / side_effects.ex
index a0f71fd889cace170e6fa109ddfb821f0e6b7ee7..6a8f1af960ffe34aadb35b287d2c0e6d38c9365e 100644 (file)
@@ -15,15 +15,12 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
   # - Add like to object
   # - Set up notification
   def handle(%{data: %{"type" => "Like"}} = object, meta) do
-    Pleroma.Repo.transaction(fn ->
-      liked_object = Object.get_by_ap_id(object.data["object"])
-      Utils.add_like_to_object(object, liked_object)
+    liked_object = Object.get_by_ap_id(object.data["object"])
+    Utils.add_like_to_object(object, liked_object)
 
-      Notification.create_notifications(object)
+    Notification.create_notifications(object)
 
-      {:ok, object, meta}
-    end)
-    |> (fn {:ok, res} -> res end).()
+    {:ok, object, meta}
   end
 
   # Nothing to do