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/lib | |
parent | 8c7223f4eac80b5725485be742d3fa2c984f4670 (diff) |
Fix error MethodError in Chewy::Strategy::Sidekiq::Worker (#17912)
Also refactor a bit to reduce code duplication.
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/feed_manager.rb | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index 709450080..085f1b274 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -5,7 +5,6 @@ require 'singleton' class FeedManager include Singleton include Redisable - include FormattingHelper # Maximum number of items stored in a single feed MAX_ITEMS = 400 @@ -443,16 +442,8 @@ class FeedManager return false if active_filters.empty? combined_regex = Regexp.union(active_filters) - status = status.reblog if status.reblog? - combined_text = [ - extract_status_plain_text(status), - status.spoiler_text, - status.preloadable_poll ? status.preloadable_poll.options.join("\n\n") : nil, - status.ordered_media_attachments.map(&:description).join("\n\n"), - ].compact.join("\n\n") - - combined_regex.match?(combined_text) + combined_regex.match?(status.proper.searchable_text) end # Adds a status to an account's feed, returning true if a status was |