diff options
author | ThibG <thib@sitedethib.com> | 2018-10-30 15:02:24 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-10-30 15:02:24 +0100 |
commit | a03d5066265c9555ea2e42cf4bb06edc7439e50c (patch) | |
tree | 45db1da2ecda2b13e2b387799e25f914afc957ca | |
parent | c1eec9869e62177cbeaa76db12682553cdeb168a (diff) |
Fix Pleroma mentions being fetched as preview cards (#9158)
-rw-r--r-- | app/services/fetch_link_card_service.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb index 462e5ee13..3e77579bb 100644 --- a/app/services/fetch_link_card_service.rb +++ b/app/services/fetch_link_card_service.rb @@ -17,8 +17,7 @@ class FetchLinkCardService < BaseService return if @url.nil? || @status.preview_cards.any? - @mentions = status.mentions - @url = @url.to_s + @url = @url.to_s RedisLock.acquire(lock_options) do |lock| if lock.acquired? @@ -84,9 +83,8 @@ class FetchLinkCardService < BaseService end def mention_link?(a) - return false if @mentions.nil? - @mentions.any? do |mention| - a['href'] == TagManager.instance.url_for(mention.target) + @status.mentions.any? do |mention| + a['href'] == TagManager.instance.url_for(mention.account) end end |