|
|
@ -17,7 +17,6 @@ class FetchLinkCardService < BaseService |
|
|
|
|
|
|
|
|
|
|
|
return if @url.nil? || @status.preview_cards.any? |
|
|
|
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| |
|
|
|
RedisLock.acquire(lock_options) do |lock| |
|
|
@ -84,9 +83,8 @@ class FetchLinkCardService < BaseService |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def mention_link?(a) |
|
|
|
def mention_link?(a) |
|
|
|
return false if @mentions.nil? |
|
|
|
@status.mentions.any? do |mention| |
|
|
|
@mentions.any? do |mention| |
|
|
|
a['href'] == TagManager.instance.url_for(mention.account) |
|
|
|
a['href'] == TagManager.instance.url_for(mention.target) |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|