From: Haelwenn (lanodan) Monnier Date: Thu, 20 Sep 2018 14:10:46 +0000 (+0200) Subject: [Pleroma.Web.MastodonAPI.StatusView] add replies_count X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=43d0b7bf7ae0e44366a56a6e0b9172b0caedd14a;p=akkoma [Pleroma.Web.MastodonAPI.StatusView] add replies_count --- 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,