Use a redis-cached feed for the DM timeline
This commit is contained in:
@@ -13,6 +13,8 @@ class FeedInsertWorker
|
||||
when :list
|
||||
@list = List.find(id)
|
||||
@follower = @list.account
|
||||
when :direct
|
||||
@account = Account.find(id)
|
||||
end
|
||||
|
||||
check_and_insert
|
||||
@@ -29,7 +31,12 @@ class FeedInsertWorker
|
||||
def feed_filtered?
|
||||
# Note: Lists are a variation of home, so the filtering rules
|
||||
# of home apply to both
|
||||
FeedManager.instance.filter?(:home, @status, @follower.id)
|
||||
case @type
|
||||
when :home, :list
|
||||
FeedManager.instance.filter?(:home, @status, @follower.id)
|
||||
when :direct
|
||||
FeedManager.instance.filter?(:direct, @status, @account.id)
|
||||
end
|
||||
end
|
||||
|
||||
def perform_push
|
||||
@@ -38,6 +45,8 @@ class FeedInsertWorker
|
||||
FeedManager.instance.push_to_home(@follower, @status)
|
||||
when :list
|
||||
FeedManager.instance.push_to_list(@list, @status)
|
||||
when :direct
|
||||
FeedManager.instance.push_to_direct(@account, @status)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user