From: Dashie Date: Wed, 2 May 2018 20:36:19 +0000 (+0200) Subject: Add localPosts count, also set to 0 if null X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=b8789cc8b68c64803dc2243768eda6c74837ba3c;p=akkoma Add localPosts count, also set to 0 if null --- 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: %{} }