Use correct activity for undo
[akkoma] / lib / pleroma / web / activity_pub / utils.ex
index 1f740eda551ee4f518c0fddb068c5e625463be33..9e2fa1fb22967875b0e8050b11e8f15854122462 100644 (file)
@@ -283,13 +283,13 @@ defmodule Pleroma.Web.ActivityPub.Utils do
   """
   def make_unannounce_data(
         %User{ap_id: ap_id} = user,
-        %Object{data: %{"id" => id, "context" => context}} = object
+        %Activity{data: %{"id" => id, "context" => context}} = activity
       ) do
     %{
       "type" => "Undo",
       "actor" => ap_id,
       "object" => id,
-      "to" => [user.follower_address, object.data["actor"]],
+      "to" => [user.follower_address, activity.data["actor"]],
       "cc" => ["https://www.w3.org/ns/activitystreams#Public"],
       "context" => context
     }