Nodeinfo: Add chat information back in.
authorlain <lain@soykaf.club>
Fri, 26 Jun 2020 11:04:15 +0000 (13:04 +0200)
committerlain <lain@soykaf.club>
Fri, 26 Jun 2020 11:04:15 +0000 (13:04 +0200)
lib/pleroma/web/nodeinfo/nodeinfo.ex
test/web/node_info_test.exs

index f7ab6d86ae125aea48ba3fce6954797d31ac9791..47fa46376caa9a89af334b5c20a11ffb4e9baf02 100644 (file)
@@ -19,35 +19,7 @@ defmodule Pleroma.Web.Nodeinfo.Nodeinfo do
       |> Enum.map(fn u -> u.ap_id end)
 
     federation = InstanceView.federation()
-
-    features =
-      [
-        "pleroma_api",
-        "mastodon_api",
-        "mastodon_api_streaming",
-        "polls",
-        "pleroma_explicit_addressing",
-        "shareable_emoji_packs",
-        "multifetch",
-        "pleroma:api/v1/notifications:include_types_filter",
-        if Config.get([:media_proxy, :enabled]) do
-          "media_proxy"
-        end,
-        if Config.get([:gopher, :enabled]) do
-          "gopher"
-        end,
-        if Config.get([:chat, :enabled]) do
-          "chat"
-        end,
-        if Config.get([:instance, :allow_relay]) do
-          "relay"
-        end,
-        if Config.get([:instance, :safe_dm_mentions]) do
-          "safe_dm_mentions"
-        end,
-        "pleroma_emoji_reactions"
-      ]
-      |> Enum.filter(& &1)
+    features = InstanceView.features()
 
     %{
       version: "2.0",
index 8b3b6177daf92cbf3be4849ae4d859aba0a8e458..06b33607fb4ace57cfe545e8976e6285a6c2aa8b 100644 (file)
@@ -142,7 +142,8 @@ defmodule Pleroma.Web.NodeInfoTest do
       "shareable_emoji_packs",
       "multifetch",
       "pleroma_emoji_reactions",
-      "pleroma:api/v1/notifications:include_types_filter"
+      "pleroma:api/v1/notifications:include_types_filter",
+      "pleroma_chat_messages"
     ]
 
     assert MapSet.subset?(