WebFinger: add subscribe_address in return data of JSON responses
authorFiveYellowMice <hkz85825915@gmail.com>
Fri, 18 Dec 2020 13:48:38 +0000 (13:48 +0000)
committerFiveYellowMice <hkz85825915@gmail.com>
Fri, 18 Dec 2020 13:48:38 +0000 (13:48 +0000)
lib/pleroma/web/web_finger.ex

index 6629f5356fb9038ae389aee5beeded159cbd2803..ca200588aa942e12a4a985d1f2494de24a1df41f 100644 (file)
@@ -116,6 +116,9 @@ defmodule Pleroma.Web.WebFinger do
           {"application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"", "self"} ->
             Map.put(data, "ap_id", link["href"])
 
+          {nil, "http://ostatus.org/schema/1.0/subscribe"} ->                 
+            Map.put(data, "subscribe_address", link["template"])
+
           _ ->
             Logger.debug("Unhandled type: #{inspect(link["type"])}")
             data