Commit 1cfc3278 authored by lain's avatar lain
Browse files

Poll View: Always return `voters_count`.

parent ba3f3a5a
......@@ -19,7 +19,7 @@ def render("show.json", %{object: object, multiple: multiple, options: options}
expired: expired,
multiple: multiple,
votes_count: votes_count,
voters_count: (multiple || nil) && voters_count(object),
voters_count: voters_count(object),
options: options,
voted: voted?(params),
emojis: Pleroma.Web.MastodonAPI.StatusView.build_emojis(object.data["emoji"])
......
......@@ -44,7 +44,7 @@ test "renders a poll" do
],
voted: false,
votes_count: 0,
voters_count: nil
voters_count: 0
}
result = PollView.render("show.json", %{object: object})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment