diff options
author | lain <lain@soykaf.club> | 2019-07-16 12:47:40 +0900 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-07-16 12:47:40 +0900 |
commit | 1ed24bcc76d27b3e00671e377a062e233376a017 (patch) | |
tree | 18f8273b638282cdf17702b1cb9d9503351acc90 | |
parent | 46ef8f021635c630bcd6973e6fbb7c58bcafb6bf (diff) | |
download | pleroma-1ed24bcc76d27b3e00671e377a062e233376a017.tar.gz |
Status View: Poll ids are strings.
All ids in mastodon are strings, in general.
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/status_view.ex | 2 | ||||
-rw-r--r-- | test/web/mastodon_api/status_view_test.exs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index 06a7251d8..de9425959 100644 --- 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/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs index ac42819d8..6507e9864 100644 --- 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}, |