|
|
|
@ -9,6 +9,8 @@ class FanOutOnWriteService < BaseService
|
|
|
|
|
render_anonymous_payload(status)
|
|
|
|
|
|
|
|
|
|
if status.direct_visibility?
|
|
|
|
|
deliver_to_mentioned_followers(status)
|
|
|
|
|
deliver_to_direct_timelines(status)
|
|
|
|
|
deliver_to_own_conversation(status)
|
|
|
|
|
elsif status.limited_visibility?
|
|
|
|
|
deliver_to_mentioned_followers(status)
|
|
|
|
@ -93,6 +95,16 @@ class FanOutOnWriteService < BaseService
|
|
|
|
|
Redis.current.publish('timeline:public:local:media', @payload) if status.local?
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def deliver_to_direct_timelines(status)
|
|
|
|
|
Rails.logger.debug "Delivering status #{status.id} to direct timelines"
|
|
|
|
|
|
|
|
|
|
status.mentions.includes(:account).each do |mention|
|
|
|
|
|
Redis.current.publish("timeline:direct:#{mention.account.id}", @payload) if mention.account.local?
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
Redis.current.publish("timeline:direct:#{status.account.id}", @payload) if status.account.local?
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def deliver_to_own_conversation(status)
|
|
|
|
|
AccountConversation.add_status(status.account, status)
|
|
|
|
|
end
|
|
|
|
|