0
0
Fork 0

Improve redirect handling in FetchAtomService

This commit is contained in:
Eugen Rochko 2016-09-26 17:04:05 +02:00
parent c6b0311b86
commit 210362e665
2 changed files with 5 additions and 4 deletions

View file

@ -9,6 +9,7 @@ class FetchRemoteAccountService < BaseService
private
def process_atom(url, body)
xml = Nokogiri::XML(body)
url_parts = Addressable::URI.parse(url)
username = xml.at_xpath('//xmlns:author/xmlns:name').try(:content)
domain = url_parts.host