Merge branch 'feature/mrf-simple-report-filtering' into 'develop'
[akkoma] / lib / pleroma / web / websub / websub.ex
index 1fb99328245f4bf348fed8511b203f76c998783e..7ad0414ab7db1b1516aa38e1f05f966264763c98 100644 (file)
@@ -7,6 +7,7 @@ defmodule Pleroma.Web.Websub do
   alias Pleroma.Activity
   alias Pleroma.Instances
   alias Pleroma.Repo
+  alias Pleroma.User
   alias Pleroma.Web.ActivityPub.Visibility
   alias Pleroma.Web.Endpoint
   alias Pleroma.Web.Federator
@@ -313,4 +314,20 @@ defmodule Pleroma.Web.Websub do
         {:error, response}
     end
   end
+
+  def gather_webfinger_links(%User{} = user) do
+    [
+      %{
+        "rel" => "http://schemas.google.com/g/2010#updates-from",
+        "type" => "application/atom+xml",
+        "href" => OStatus.feed_path(user)
+      },
+      %{
+        "rel" => "http://ostatus.org/schema/1.0/subscribe",
+        "template" => OStatus.remote_follow_path()
+      }
+    ]
+  end
+
+  def gather_nodeinfo_protocol_names, do: ["ostatus"]
 end