You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
345 B

  1. require 'singleton'
  2. class FeedManager
  3. include Singleton
  4. MAX_ITEMS = 800
  5. def key(type, id)
  6. "feed:#{type}:#{id}"
  7. end
  8. def filter_status?(status, follower)
  9. replied_to_user = status.reply? ? status.thread.account : nil
  10. (status.reply? && !(follower.id = replied_to_user.id || follower.following?(replied_to_user)))
  11. end
  12. end