diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2018-09-20 16:10:46 +0200 |
---|---|---|
committer | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2018-09-20 16:10:46 +0200 |
commit | 43d0b7bf7ae0e44366a56a6e0b9172b0caedd14a (patch) | |
tree | f5ed02f7e275852d558f4bbc27cdf84b00ce4125 | |
parent | c9585ec00760b46f013f36a7f7625ac36471d3e8 (diff) | |
download | pleroma-43d0b7bf7ae0e44366a56a6e0b9172b0caedd14a.tar.gz |
[Pleroma.Web.MastodonAPI.StatusView] add replies_count
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/status_view.ex | 2 | ||||
-rw-r--r-- | test/web/mastodon_api/status_view_test.exs | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index 284df837a..ffc105196 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -63,6 +63,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do content: reblogged[:content], created_at: created_at, reblogs_count: 0, + replies_count: 0, favourites_count: 0, reblogged: false, favourited: false, @@ -132,6 +133,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do content: render_content(object), created_at: created_at, reblogs_count: announcement_count, + replies_count: 0, favourites_count: like_count, reblogged: !!repeated, favourited: !!favorited, diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs index b3b6c5851..b9c019206 100644 --- a/test/web/mastodon_api/status_view_test.exs +++ b/test/web/mastodon_api/status_view_test.exs @@ -28,6 +28,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do content: HtmlSanitizeEx.basic_html(note.data["object"]["content"]), created_at: created_at, reblogs_count: 0, + replies_count: 0, favourites_count: 0, reblogged: false, favourited: false, |