[Pleroma.Web.MastodonAPI.StatusView] add replies_count
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Thu, 20 Sep 2018 14:10:46 +0000 (16:10 +0200)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Thu, 20 Sep 2018 14:10:46 +0000 (16:10 +0200)
lib/pleroma/web/mastodon_api/views/status_view.ex
test/web/mastodon_api/status_view_test.exs

index 284df837a556e280d0a55c4b61c01c9ec13106c2..ffc1051963bd516816974e1939ffaffec15791f9 100644 (file)
@@ -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,
index b3b6c5851874e42b39af642e1f2b1d711d8c99aa..b9c019206c9034c1bf817d87b84194cc0643b65d 100644 (file)
@@ -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,