Return object id in Ostatus create activties.
[akkoma] / lib / pleroma / web / activity_pub / activity_pub.ex
index b2508de68a7092b6e6a680f8ac2252d7a30094ae..125473b96a496fffb57dc89797251b193c4687c6 100644 (file)
@@ -33,7 +33,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
           "type" => "Like",
           "actor" => ap_id,
           "object" => id,
-          "to" => [User.ap_followers(user)]
+          "to" => [User.ap_followers(user), object.data["actor"]]
         }
 
         {:ok, activity} = insert(data)
@@ -142,7 +142,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
       "type" => "Announce",
       "actor" => ap_id,
       "object" => id,
-      "to" => [User.ap_followers(user)]
+      "to" => [User.ap_followers(user), object.data["actor"]]
     }
 
     {:ok, activity} = insert(data)
@@ -167,7 +167,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
     Repo.all(query)
   end
 
-  def upload(%Plug.Upload{} = file) do
+  def upload(file) do
     data = Upload.store(file)
     Repo.insert(%Object{data: data})
   end