forked from AkkomaGang/akkoma
Fix CommonAPI.vote returning tuples inside of the activity array instead of just activities
This commit is contained in:
parent
29b022bb59
commit
17383861ed
1 changed files with 10 additions and 7 deletions
|
@ -132,13 +132,16 @@ def vote(user, object, choices) do
|
||||||
Enum.map(choices, fn index ->
|
Enum.map(choices, fn index ->
|
||||||
answer_data = make_answer_data(user, object, Enum.at(options, index)["name"])
|
answer_data = make_answer_data(user, object, Enum.at(options, index)["name"])
|
||||||
|
|
||||||
ActivityPub.create(%{
|
{:ok, activity} =
|
||||||
to: answer_data["to"],
|
ActivityPub.create(%{
|
||||||
actor: user,
|
to: answer_data["to"],
|
||||||
context: object.data["context"],
|
actor: user,
|
||||||
object: answer_data,
|
context: object.data["context"],
|
||||||
additional: %{"cc" => answer_data["cc"]}
|
object: answer_data,
|
||||||
})
|
additional: %{"cc" => answer_data["cc"]}
|
||||||
|
})
|
||||||
|
|
||||||
|
activity
|
||||||
end)
|
end)
|
||||||
|
|
||||||
object = Object.get_cached_by_ap_id(object.data["id"])
|
object = Object.get_cached_by_ap_id(object.data["id"])
|
||||||
|
|
Loading…
Reference in a new issue