]> cat aescling's git repositories - mastodon.git/commitdiff
Fix #651 - Do not reinsert original status into all followers feeds
authorEugen Rochko <eugen@zeonfederated.com>
Wed, 22 Feb 2017 14:52:47 +0000 (15:52 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 22 Feb 2017 14:52:47 +0000 (15:52 +0100)
upon un-reblogging. Check if the reblog was in the feed in the first
place. It might have been filtered on distribution.

app/services/remove_status_service.rb

index 73b545f170bdee214d292d248b348c090776c0fa..cf1f432e4814923a1ec953c07cb80e606cb30397 100644 (file)
@@ -59,7 +59,7 @@ class RemoveStatusService < BaseService
   end
 
   def unpush(type, receiver, status)
-    if status.reblog?
+    if status.reblog? && !redis.zscore(FeedManager.instance.key(type, receiver.id), status.reblog_of_id).nil?
       redis.zadd(FeedManager.instance.key(type, receiver.id), status.reblog_of_id, status.reblog_of_id)
     else
       redis.zremrangebyscore(FeedManager.instance.key(type, receiver.id), status.id, status.id)