mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 08:36:29 +00:00
Merge branch 'bugfix/poll-id-as-string' into 'develop'
Status View: Poll ids are strings. See merge request pleroma/pleroma!1430
This commit is contained in:
commit
996fd58ac4
3 changed files with 3 additions and 3 deletions
|
@ -382,7 +382,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
|
||||||
%{
|
%{
|
||||||
# Mastodon uses separate ids for polls, but an object can't have
|
# Mastodon uses separate ids for polls, but an object can't have
|
||||||
# more than one poll embedded so object id is fine
|
# more than one poll embedded so object id is fine
|
||||||
id: object.id,
|
id: to_string(object.id),
|
||||||
expires_at: Utils.to_masto_date(end_time),
|
expires_at: Utils.to_masto_date(end_time),
|
||||||
expired: expired,
|
expired: expired,
|
||||||
multiple: multiple,
|
multiple: multiple,
|
||||||
|
|
|
@ -3576,7 +3576,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
|
||||||
|> get("/api/v1/polls/#{object.id}")
|
|> get("/api/v1/polls/#{object.id}")
|
||||||
|
|
||||||
response = json_response(conn, 200)
|
response = json_response(conn, 200)
|
||||||
id = object.id
|
id = to_string(object.id)
|
||||||
assert %{"id" => ^id, "expired" => false, "multiple" => false} = response
|
assert %{"id" => ^id, "expired" => false, "multiple" => false} = response
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -423,7 +423,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
||||||
expected = %{
|
expected = %{
|
||||||
emojis: [],
|
emojis: [],
|
||||||
expired: false,
|
expired: false,
|
||||||
id: object.id,
|
id: to_string(object.id),
|
||||||
multiple: false,
|
multiple: false,
|
||||||
options: [
|
options: [
|
||||||
%{title: "absolutely!", votes_count: 0},
|
%{title: "absolutely!", votes_count: 0},
|
||||||
|
|
Loading…
Reference in a new issue