Refactored generation of unique tags, URIs and object URLs into own classes,
as well as formatting of content
This commit is contained in:
parent
735b4cc62e
commit
3cc47beb6e
28 changed files with 316 additions and 180 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue