diff options
author | rinpatch <rinpatch@sdf.org> | 2019-05-18 13:29:28 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-05-18 13:29:28 +0300 |
commit | fd920c897339b9cedea042dd6698d14380cedae7 (patch) | |
tree | da77fda315d2a8ae4bff3358aec60f776cf63253 /lib/pleroma/web/common_api/common_api.ex | |
parent | 642a67dd4492f31b5b9fe457e34c1589c9d70c3f (diff) | |
download | pleroma-fd920c897339b9cedea042dd6698d14380cedae7.tar.gz |
Mastodon API: Add support for posting polls
Diffstat (limited to 'lib/pleroma/web/common_api/common_api.ex')
-rw-r--r-- | lib/pleroma/web/common_api/common_api.ex | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex index b53869c75..335ae70b0 100644 --- a/lib/pleroma/web/common_api/common_api.ex +++ b/lib/pleroma/web/common_api/common_api.ex @@ -149,6 +149,7 @@ defmodule Pleroma.Web.CommonAPI do data, visibility ), + {poll, mentions, tags} <- make_poll_data(data, mentions, tags), {to, cc} <- to_for_user_and_mentions(user, mentions, in_reply_to, visibility), context <- make_context(in_reply_to), cw <- data["spoiler_text"] || "", @@ -164,7 +165,8 @@ defmodule Pleroma.Web.CommonAPI do in_reply_to, tags, cw, - cc + cc, + poll ), object <- Map.put( |