From b8789cc8b68c64803dc2243768eda6c74837ba3c Mon Sep 17 00:00:00 2001 From: Dashie Date: Wed, 2 May 2018 22:36:19 +0200 Subject: [PATCH] Add localPosts count, also set to 0 if null --- lib/pleroma/web/nodeinfo/nodeinfo_controller.ex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex index 4f18a9c33..6db0d19e3 100644 --- a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex +++ b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex @@ -36,8 +36,9 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do openRegistrations: Keyword.get(@instance, :registrations_open), usage: %{ users: %{ - total: Stats.get_stats().user_count - } + total: Stats.get_stats().user_count || 0 + }, + localPosts: Stats.get_stats().status_count || 0 }, metadata: %{} } -- 2.45.2