Browse Source

Update HomeTimelineService, apply filters to feed warm logic

Daniel Supernault 1 năm trước cách đây
mục cha
commit
c39b9afbfd
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      app/Services/HomeTimelineService.php

+ 6 - 0
app/Services/HomeTimelineService.php

@@ -75,6 +75,12 @@ class HomeTimelineService
 
             $minId = SnowflakeService::byDate(now()->subMonths(6));
 
+            $filters = UserFilterService::filters($id);
+
+            if($filters && count($filters)) {
+                $following = array_diff($following, $filters);
+            }
+
             $ids = Status::where('id', '>', $minId)
                 ->whereIn('profile_id', $following)
                 ->whereNull(['in_reply_to_id', 'reblog_of_id'])