Browse Source

Status View: Poll ids are strings.

All ids in mastodon are strings, in general.
tags/v1.1.4
lain 5 years ago
parent
commit
1ed24bcc76
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      lib/pleroma/web/mastodon_api/views/status_view.ex
  2. +1
    -1
      test/web/mastodon_api/status_view_test.exs

+ 1
- 1
lib/pleroma/web/mastodon_api/views/status_view.ex View File

@@ -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,


+ 1
- 1
test/web/mastodon_api/status_view_test.exs View File

@@ -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},


Loading…
Cancel
Save