about summary refs log tree commit diff
path: root/app/lib/feed_manager.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-11-27 16:26:18 +0100
committerGitHub <noreply@github.com>2018-11-27 16:26:18 +0100
commit33be091f506242b136b0d4a65cf06a0babc4d757 (patch)
tree0f9f6e40e40f4ecabfa1e5f906000abe756f42a9 /app/lib/feed_manager.rb
parent6b6e633c095485f95350c4308a942192e5fe8806 (diff)
parent55edfd6e0e1cb5377f0c3406d94ddfd84ddb7b20 (diff)
Merge pull request #828 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/lib/feed_manager.rb')
-rw-r--r--app/lib/feed_manager.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb
index 3d7db2721..31ff53860 100644
--- a/app/lib/feed_manager.rb
+++ b/app/lib/feed_manager.rb
@@ -40,7 +40,11 @@ class FeedManager
   end
 
   def push_to_list(list, status)
-    return false if status.reply? && status.in_reply_to_account_id != status.account_id
+    if status.reply? && status.in_reply_to_account_id != status.account_id
+      should_filter = status.in_reply_to_account_id != list.account_id
+      should_filter &&= !ListAccount.where(list_id: list.id, account_id: status.in_reply_to_account_id).exists?
+      return false if should_filter
+    end
     return false unless add_to_feed(:list, list.id, status)
     trim(:list, list.id)
     PushUpdateWorker.perform_async(list.account_id, status.id, "timeline:list:#{list.id}") if push_update_required?("timeline:list:#{list.id}")