webfinger: only do ld+json on modern json webfinger
authorWilliam Pitcock <nenolod@dereferenced.org>
Sat, 19 May 2018 06:15:21 +0000 (06:15 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Sat, 19 May 2018 06:28:19 +0000 (01:28 -0500)
lib/pleroma/web/web_finger/web_finger.ex

index b955bc43f9ca7c625661fdcba7bd62f4e76f1444..3744dd62ff4b9dfd5c7cc05379bb2044ff79c060 100644 (file)
@@ -118,7 +118,6 @@ defmodule Pleroma.Web.WebFinger do
         {:Link,
          %{rel: "magic-public-key", href: "data:application/magic-public-key,#{magic_key}"}},
         {:Link, %{rel: "self", type: "application/activity+json", href: user.ap_id}},
-        {:Link, %{rel: "self", type: "application/ld+json; profile=&quot;https://www.w3.org/ns/activitystreams&quot;", href: user.ap_id}},
         {:Link,
          %{rel: "http://ostatus.org/schema/1.0/subscribe", template: OStatus.remote_follow_path()}}
       ]
@@ -166,14 +165,6 @@ defmodule Pleroma.Web.WebFinger do
         doc
       )
 
-    if ap_id == nil do
-      ap_id =
-        XML.string_from_xpath(
-          ~s{//Link[@rel="self" and @type="application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\""]/@href},
-          doc
-        )
-    end
-
     data = %{
       "magic_key" => magic_key,
       "topic" => topic,