Skip to content
Snippets Groups Projects
Commit 760cfe32 authored by unarist's avatar unarist Committed by Eugen Rochko
Browse files

Fix accessing to XML attribute in FetchAtomService (#4668)

parent c1b086a5
No related branches found
No related tags found
No related merge requests found
......@@ -62,8 +62,8 @@ class FetchAtomService < BaseService
json_link = page.xpath('//link[@rel="alternate"]').find { |link| ['application/activity+json', 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'].include?(link['type']) }
atom_link = page.xpath('//link[@rel="alternate"]').find { |link| link['type'] == 'application/atom+xml' }
result ||= process(json_link.href, terminal: true) unless json_link.nil? || @unsupported_activity
result ||= process(atom_link.href, terminal: true) unless atom_link.nil?
result ||= process(json_link['href'], terminal: true) unless json_link.nil? || @unsupported_activity
result ||= process(atom_link['href'], terminal: true) unless atom_link.nil?
result
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment