From dcee25381b4e5f6c63456c6f5da19b0be96135a3 Mon Sep 17 00:00:00 2001 From: YoheiZuho Date: Sun, 16 May 2021 08:28:06 +0200 Subject: [PATCH] Revert "Add a quote URL to the search target string" This reverts commit c1a505e654bb8ce275284de57d4f4e0229b7bf94. --- app/models/status.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/models/status.rb b/app/models/status.rb index 5e1be3cb8..847921ac2 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -229,11 +229,7 @@ class Status < ApplicationRecord fields = [spoiler_text, text] fields += preloadable_poll.options unless preloadable_poll.nil? - @emojis = CustomEmoji.from_text(fields.join(' '), account.domain) + (quote? ? CustomEmoji.from_text([quote.spoiler_text, quote.text].join(' '), quote.account.domain) : []) - end - - def index_text - @index_text ||= [spoiler_text, Formatter.instance.plaintext(self)].concat(media_attachments.map(&:description)).concat(preloadable_poll ? preloadable_poll.options : []).concat(quote? ? ["QT: [#{quote.url || ActivityPub::TagManager.instance.url_for(quote)}]"] : []).filter(&:present?).join("\n\n") + @emojis = CustomEmoji.from_text(fields.join(' '), account.domain) end def replies_count