diff options
author | David Yip <yipdw@member.fsf.org> | 2017-10-16 09:23:59 -0500 |
---|---|---|
committer | David Yip <yipdw@member.fsf.org> | 2017-10-16 09:23:59 -0500 |
commit | dbb1fce94dbd877d795898933ca344359f9b74c1 (patch) | |
tree | 06ab5f2ae7714b41aa9e5cc19ac8c234e0f394be /app/lib/feed_manager.rb | |
parent | 6cd5b3bbe5a11fcf25bbefba2803f2ae840f39fc (diff) | |
parent | aec70b44fc551db6471c8bc5210688b154ac661f (diff) |
Merge remote-tracking branch 'upstream/master' into gs-master
Diffstat (limited to 'app/lib/feed_manager.rb')
-rw-r--r-- | app/lib/feed_manager.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index 5a3af7206..1bbaad4cc 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -204,10 +204,11 @@ class FeedManager # 2. Remove the reblogged status from the `:reblogs` zset. redis.zrem(reblog_key, status.reblog_of_id) - # 3. Add the reblogged status to the feed using the reblogging - # status' ID as its score, and the reblogged status' ID as its - # value. - redis.zadd(timeline_key, status.id, status.reblog_of_id) + # 3. Add the reblogged status to the feed. + # Note that we can't use old score in here + # and it must be an ID of corresponding status + # because we need to filter timeline by status ID. + redis.zadd(timeline_key, status.reblog_of_id, status.reblog_of_id) # 4. Remove the reblogging status from the feed (as normal) end |