mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-30 02:49:03 +01:00
Fix Pleroma mentions being fetched as preview cards (#9158)
This commit is contained in:
parent
c1eec9869e
commit
a03d506626
1 changed files with 3 additions and 5 deletions
|
@ -17,7 +17,6 @@ class FetchLinkCardService < BaseService
|
|||
|
||||
return if @url.nil? || @status.preview_cards.any?
|
||||
|
||||
@mentions = status.mentions
|
||||
@url = @url.to_s
|
||||
|
||||
RedisLock.acquire(lock_options) do |lock|
|
||||
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue