瀏覽代碼

Fix CommonAPI.vote returning tuples inside of the activity array instead of just activities

tags/v1.1.4
rinpatch 5 年之前
父節點
當前提交
17383861ed
共有 1 個文件被更改,包括 10 次插入7 次删除
  1. +10
    -7
      lib/pleroma/web/common_api/common_api.ex

+ 10
- 7
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"])


Loading…
取消
儲存