Add poll votes
[akkoma] / lib / pleroma / web / common_api / utils.ex
index 1a239de97377fb716c57cfb521281731c28b45cd..f35ed36abc55bd7cd14c0ca793cf3ae5716c229c 100644 (file)
@@ -491,4 +491,15 @@ defmodule Pleroma.Web.CommonAPI.Utils do
         {:error, "No such conversation"}
     end
   end
+
+  def make_answer_data(%User{ap_id: ap_id}, object, name) do
+    %{
+      "type" => "Answer",
+      "actor" => ap_id,
+      "cc" => [object.data["actor"]],
+      "to" => [],
+      "name" => name,
+      "inReplyTo" => object.data["id"]
+    }
+  end
 end