summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-07-16 12:47:40 +0900
committerAriadne Conill <ariadne@dereferenced.org>2019-07-28 22:33:09 +0000
commit8123578bf818d6e28cabb27a0fe6fa888e3c9449 (patch)
tree2f5f12462147512e6677afe6b8f98e1d8cbdacc4
parent5cb37412a21420509f61027fe486ae66242f800a (diff)
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.ex2
-rw-r--r--test/web/mastodon_api/status_view_test.exs2
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 6836d331a..c183c9f4a 100644
--- a/lib/pleroma/web/mastodon_api/views/status_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/status_view.ex
@@ -374,7 +374,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 ec75150ab..0d8eefeb8 100644
--- a/test/web/mastodon_api/status_view_test.exs
+++ b/test/web/mastodon_api/status_view_test.exs
@@ -361,7 +361,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},