Prettier account and stream entry URLs

This commit is contained in:
Eugen Rochko 2017-03-22 19:26:22 +01:00
parent 33fac87e81
commit d6ed2eb512
8 changed files with 53 additions and 11 deletions

View file

@ -64,7 +64,7 @@ class ProcessInteractionService < BaseService
end
def mentions_account?(xml, account)
xml.xpath('/xmlns:entry/xmlns:link[@rel="mentioned"]', xmlns: TagManager::XMLNS).each { |mention_link| return true if mention_link.attribute('href').value == TagManager.instance.url_for(account) }
xml.xpath('/xmlns:entry/xmlns:link[@rel="mentioned"]', xmlns: TagManager::XMLNS).each { |mention_link| return true if [TagManager.instance.uri_for(account), TagManager.instance.url_for(account)].include?(mention_link.attribute('href').value) }
false
end