diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-03-31 00:49:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-31 00:49:24 +0200 |
commit | ef196c913c77338be5ebb1e02af2f6225f857080 (patch) | |
tree | 2640d4bb0fee2c0d62183a64b0b4d0857c75f0d6 /app/models | |
parent | 8c7223f4eac80b5725485be742d3fa2c984f4670 (diff) |
Fix error MethodError in Chewy::Strategy::Sidekiq::Worker (#17912)
Also refactor a bit to reduce code duplication.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/status.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/status.rb b/app/models/status.rb index bf5a49b7f..a71451f50 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -155,6 +155,15 @@ class Status < ApplicationRecord ids.uniq end + def searchable_text + [ + spoiler_text, + FormattingHelper.extract_status_plain_text(self), + preloadable_poll ? preloadable_poll.options.join("\n\n") : nil, + ordered_media_attachments.map(&:description).join("\n\n"), + ].compact.join("\n\n") + end + def reply? !in_reply_to_id.nil? || attributes['reply'] end |