Refactored generation of unique tags, URIs and object URLs into own classes,

as well as formatting of content
This commit is contained in:
Eugen Rochko 2016-09-09 20:04:34 +02:00
parent 735b4cc62e
commit 3cc47beb6e
28 changed files with 316 additions and 180 deletions

View file

@ -1,11 +1,15 @@
require 'singleton'
class FeedManager
include Singleton
MAX_ITEMS = 800
def self.key(type, id)
def key(type, id)
"feed:#{type}:#{id}"
end
def self.filter_status?(status, follower)
def filter_status?(status, follower)
replied_to_user = status.reply? ? status.thread.account : nil
(status.reply? && !(follower.id = replied_to_user.id || follower.following?(replied_to_user)))
end