]> cat aescling's git repositories - mastodon.git/commitdiff
Use active record shorthand
authorKurtis Rainbolt-Greene <kurtis@rainbolt-greene.online>
Tue, 4 Apr 2017 16:04:07 +0000 (09:04 -0700)
committerGitHub <noreply@github.com>
Tue, 4 Apr 2017 16:04:07 +0000 (09:04 -0700)
app/lib/feed_manager.rb

index a2efcce10729fc7daf6a79d66f0b922e9eac8c58..9398d6c700b09b8c1e255f5b50ff1660efb3d2db 100644 (file)
@@ -118,7 +118,7 @@ class FeedManager
 
   def filter_from_mentions?(status, receiver)
     check_for_blocks = [status.account_id]
-    check_for_blocks.concat(status.mentions.select('account_id').map(&:account_id))
+    check_for_blocks.concat(status.mentions.pluck(:account_id))
     check_for_blocks.concat([status.in_reply_to_account]) if status.reply? && !status.in_reply_to_account_id.nil?
 
     should_filter   = receiver.id == status.account_id                                      # Filter if I'm mentioning myself