diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-25 02:13:30 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-25 02:13:30 +0100 |
commit | a08e724476f47b85de9bb334eeadaf882a7a23ee (patch) | |
tree | d779668fa289d2b7077c878b19fc6691a57142b7 /app/lib | |
parent | 9594f0e858172b9295c5598fcb6ab10506d3046d (diff) |
Fix subscriptions:clear task, refactor feeds, refactor streamable activites
and atom feed generation to some extent, as well as the way mentions are stored
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/feed_manager.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb new file mode 100644 index 000000000..eaa9393d5 --- /dev/null +++ b/app/lib/feed_manager.rb @@ -0,0 +1,11 @@ +class FeedManager + MAX_ITEMS = 800 + + def self.key(type, id) + "feed:#{type}:#{id}" + end + + def self.filter_status?(status, follower) + (status.reply? && !(follower.id = replied_to_user.id || follower.following?(replied_to_user))) + end +end |