diff options
author | rinpatch <rinpatch@sdf.org> | 2019-06-04 13:38:24 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-06-04 13:38:32 +0300 |
commit | 17383861edf6c9d7308101182607e7ff9202af73 (patch) | |
tree | fa1de37f2f761b8bb26091278b389946dc43ff55 /lib/pleroma/web/common_api/common_api.ex | |
parent | 29b022bb597f36621ef3f5056c5ca2b7f0c8edbe (diff) | |
download | pleroma-17383861edf6c9d7308101182607e7ff9202af73.tar.gz |
Fix CommonAPI.vote returning tuples inside of the activity array instead of just activities
Diffstat (limited to 'lib/pleroma/web/common_api/common_api.ex')
-rw-r--r-- | lib/pleroma/web/common_api/common_api.ex | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex index 5212d5ce5..ad3c03c55 100644 --- a/lib/pleroma/web/common_api/common_api.ex +++ b/lib/pleroma/web/common_api/common_api.ex @@ -132,13 +132,16 @@ defmodule Pleroma.Web.CommonAPI do Enum.map(choices, fn index -> answer_data = make_answer_data(user, object, Enum.at(options, index)["name"]) - ActivityPub.create(%{ - to: answer_data["to"], - actor: user, - context: object.data["context"], - object: answer_data, - additional: %{"cc" => answer_data["cc"]} - }) + {:ok, activity} = + ActivityPub.create(%{ + to: answer_data["to"], + actor: user, + context: object.data["context"], + object: answer_data, + additional: %{"cc" => answer_data["cc"]} + }) + + activity end) object = Object.get_cached_by_ap_id(object.data["id"]) |