Fix accessing to XML attribute in FetchAtomService (#4668)
This commit is contained in:
parent
c1b086a538
commit
760cfe328f
1 changed files with 2 additions and 2 deletions
|
@ -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']) }
|
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' }
|
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(json_link['href'], terminal: true) unless json_link.nil? || @unsupported_activity
|
||||||
result ||= process(atom_link.href, terminal: true) unless atom_link.nil?
|
result ||= process(atom_link['href'], terminal: true) unless atom_link.nil?
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue