logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: 996fd58ac45447171d1d5049f20f847c9c1b0fc2
parent: 9f987dd017f352d63c7441e2cce301aea07082a8
Author: rinpatch <rinpatch@sdf.org>
Date:   Tue, 16 Jul 2019 06:06:22 +0000

Merge branch 'bugfix/poll-id-as-string' into 'develop'

Status View: Poll ids are strings.

See merge request pleroma/pleroma!1430

Diffstat:

Mlib/pleroma/web/mastodon_api/views/status_view.ex2+-
Mtest/web/mastodon_api/mastodon_api_controller_test.exs2+-
Mtest/web/mastodon_api/status_view_test.exs2+-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -382,7 +382,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do %{ # Mastodon uses separate ids for polls, but an object can't have # 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), expired: expired, multiple: multiple, diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -3576,7 +3576,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do |> get("/api/v1/polls/#{object.id}") response = json_response(conn, 200) - id = object.id + id = to_string(object.id) assert %{"id" => ^id, "expired" => false, "multiple" => false} = response end diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs @@ -423,7 +423,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do expected = %{ emojis: [], expired: false, - id: object.id, + id: to_string(object.id), multiple: false, options: [ %{title: "absolutely!", votes_count: 0},