remove_from_self if status.account.local?
remove_from_followers
+ remove_from_affected
remove_reblogs
remove_from_hashtags
remove_from_public
end
end
+ def remove_from_affected
+ @mentions.map(&:account).select(&:local?).each do |account|
+ Redis.current.publish("timeline:#{account.id}", @payload)
+ end
+ end
+
def remove_from_remote_affected
# People who got mentioned in the status, or who
# reblogged it from someone else might not follow
end
def remove_from_hashtags
+ return unless @status.public_visibility?
+
@tags.each do |hashtag|
Redis.current.publish("timeline:hashtag:#{hashtag}", @payload)
Redis.current.publish("timeline:hashtag:#{hashtag}:local", @payload) if @status.local?
end
def remove_from_public
+ return unless @status.public_visibility?
+
Redis.current.publish('timeline:public', @payload)
Redis.current.publish('timeline:public:local', @payload) if @status.local?
end