aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api/utils.ex
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-06-01 16:07:01 +0300
committerrinpatch <rinpatch@sdf.org>2019-06-01 16:17:46 +0300
commit300d94c62829d0ec961f3ed6c0242dea102ab0ad (patch)
tree53e0c4a7ad91786f5dbc0e7dd20018e231032cf2 /lib/pleroma/web/common_api/utils.ex
parent8b2d39c1ec8f47df8a2159c23eabdc61b983ddf0 (diff)
downloadpleroma-300d94c62829d0ec961f3ed6c0242dea102ab0ad.tar.gz
Add poll votes
Also in this commit by accident: - Fix query ordering causing exclude_poll_votes to not work - Do not create notifications for Answer objects
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r--lib/pleroma/web/common_api/utils.ex11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex
index 1a239de97..f35ed36ab 100644
--- a/lib/pleroma/web/common_api/utils.ex
+++ b/lib/pleroma/web/common_api/utils.ex
@@ -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