diff options
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/feed_manager.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index 339a5c78b..aaff9acd3 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -76,6 +76,14 @@ class FeedManager end end + def clear_from_timeline(account, target_account) + timeline_key = key(:home, account.id) + timeline_status_ids = redis.zrange(timeline_key, 0, -1) + target_status_ids = Status.where(id: timeline_status_ids, account: target_account).ids + + redis.zrem(timeline_key, target_status_ids) if target_status_ids.present? + end + private def redis |