X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpleroma%2Fweb%2Fnodeinfo%2Fnodeinfo.ex;h=532ae53a721d3a4eaaa19a9e70ba213360b67462;hb=85048781871efe8c9abda3f2ca44b7e17f8ab84c;hp=47fa46376caa9a89af334b5c20a11ffb4e9baf02;hpb=b950fb01db51f14a9fd3a827b90573418a5b95da;p=akkoma
diff --git a/lib/pleroma/web/nodeinfo/nodeinfo.ex b/lib/pleroma/web/nodeinfo/nodeinfo.ex
index 47fa46376..532ae53a7 100644
--- a/lib/pleroma/web/nodeinfo/nodeinfo.ex
+++ b/lib/pleroma/web/nodeinfo/nodeinfo.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Nodeinfo.Nodeinfo do
@@ -35,7 +35,9 @@ defmodule Pleroma.Web.Nodeinfo.Nodeinfo do
openRegistrations: Config.get([:instance, :registrations_open]),
usage: %{
users: %{
- total: Map.get(stats, :user_count, 0)
+ total: Map.get(stats, :user_count, 0),
+ activeMonth: Pleroma.User.active_user_count(30),
+ activeHalfyear: Pleroma.User.active_user_count(180)
},
localPosts: Map.get(stats, :status_count, 0)
},
@@ -67,7 +69,17 @@ defmodule Pleroma.Web.Nodeinfo.Nodeinfo do
mailerEnabled: Config.get([Pleroma.Emails.Mailer, :enabled], false),
features: features,
restrictedNicknames: Config.get([Pleroma.User, :restricted_nicknames]),
- skipThreadContainment: Config.get([:instance, :skip_thread_containment], false)
+ skipThreadContainment: Config.get([:instance, :skip_thread_containment], false),
+ privilegedStaff: Config.get([:instance, :privileged_staff]),
+ localBubbleInstances: Config.get([:instance, :local_bubble], []),
+ publicTimelineVisibility: %{
+ federated:
+ !Config.restrict_unauthenticated_access?(:timelines, :federated) &&
+ Config.get([:instance, :federated_timeline_available], true),
+ local: !Config.restrict_unauthenticated_access?(:timelines, :local),
+ bubble: !Config.restrict_unauthenticated_access?(:timelines, :bubble)
+ },
+ federatedTimelineAvailable: Config.get([:instance, :federated_timeline_available], true)
}
}
end