Add localPosts count, also set to 0 if null
authorDashie <dashie@sigpipe.me>
Wed, 2 May 2018 20:36:19 +0000 (22:36 +0200)
committerDashie <dashie@sigpipe.me>
Wed, 2 May 2018 20:36:19 +0000 (22:36 +0200)
lib/pleroma/web/nodeinfo/nodeinfo_controller.ex

index 4f18a9c330115fe350844f8ad7ef30d336f4fc16..6db0d19e35a5e3d9a572dbf4793adc572c2c0007 100644 (file)
@@ -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: %{}
     }