webfinger: fix finding the XRD uri for statusnet instances

This commit is contained in:
William Pitcock 2018-05-21 12:38:12 +00:00
commit 75cfd9d34d
4 changed files with 17 additions and 1 deletions

View file

@ -214,7 +214,7 @@ defmodule Pleroma.Web.WebFinger do
end
def get_template_from_xml(body) do
xpath = "//Link[@rel='lrdd' and @type='application/xrd+xml']/@template"
xpath = "//Link[@rel='lrdd']/@template"
with doc when doc != :error <- XML.parse_document(body),
template when template != nil <- XML.string_from_xpath(xpath, doc) do