X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpleroma%2Fweb%2Fnodeinfo%2Fnodeinfo_controller.ex;h=58009b2792f541803e4b616e554c1143b301d987;hb=931d663a3a9da845b9f789ed9c2b5e35140df22f;hp=33301292005ce74b3e9c2b0b30981725d0270ec7;hpb=264d18be32d1745e1106f68e772b307f91bc9f5b;p=akkoma
diff --git a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
index 333012920..58009b279 100644
--- a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
+++ b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Nodeinfo.NodeinfoController do
@@ -33,12 +33,16 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do
# under software.
def raw_nodeinfo do
stats = Stats.get_stats()
-
- quarantined = Config.get([:instance, :quarantined_instances], [])
+ exclusions = Config.get([:instance, :mrf_transparency_exclusions], [])
+
+ quarantined =
+ Config.get([:instance, :quarantined_instances], [])
+ |> Enum.filter(fn x -> !Enum.member?(exclusions, x) end)
staff_accounts =
User.all_superusers()
|> Enum.map(fn u -> u.ap_id end)
+ |> Enum.filter(fn u -> not Enum.member?(Config.get([:instance, :staff_transparency]), u) end)
federation_response =
if Config.get([:instance, :mrf_transparency]) do
@@ -60,6 +64,7 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do
"pleroma_explicit_addressing",
"shareable_emoji_packs",
"multifetch",
+ "pleroma:api/v1/notifications:include_types_filter",
if Config.get([:media_proxy, :enabled]) do
"media_proxy"
end,
@@ -92,9 +97,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]),