Keep new DMs in home feeds and in the old DM timeline

Revert server-side part of 87fdd139b8
This commit is contained in:
Thibaut Girka
2018-10-22 18:15:51 +02:00
parent dcded13a99
commit e45a6edd65
3 changed files with 31 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ class RemoveStatusService < BaseService
remove_from_hashtags
remove_from_public
remove_from_media if status.media_attachments.any?
remove_from_direct if status.direct_visibility?
@status.destroy!
@@ -152,6 +153,13 @@ class RemoveStatusService < BaseService
Redis.current.publish('timeline:public:local:media', @payload) if @status.local?
end
def remove_from_direct
@mentions.each do |mention|
Redis.current.publish("timeline:direct:#{mention.account.id}", @payload) if mention.account.local?
end
Redis.current.publish("timeline:direct:#{@account.id}", @payload) if @account.local?
end
def redis
Redis.current
end