Mastodon API: do not create a following relationship if the corresponding follow...
[akkoma] / lib / pleroma / web / nodeinfo / nodeinfo_controller.ex
index 33301292005ce74b3e9c2b0b30981725d0270ec7..18eb413338e223c6aa64b5204b6bccd87effc5e9 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.Nodeinfo.NodeinfoController do
@@ -92,9 +92,9 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do
       openRegistrations: Config.get([:instance, :registrations_open]),
       usage: %{
         users: %{
-          total: stats.user_count || 0
+          total: Map.get(stats, :user_count, 0)
         },
-        localPosts: stats.status_count || 0
+        localPosts: Map.get(stats, :status_count, 0)
       },
       metadata: %{
         nodeName: Config.get([:instance, :name]),