sid; } /** * Get the middleware the job should pass through. * * @return array */ public function middleware(): array { return [(new WithoutOverlapping("hts:feed:insert:sid:{$this->sid}"))->shared()->dontRelease()]; } /** * Create a new job instance. */ public function __construct($sid, $pid) { $this->sid = $sid; $this->pid = $pid; } /** * Execute the job. */ public function handle(): void { $sid = $this->sid; $status = StatusService::get($sid, false); if(!$status) { return; } if(!in_array($status['pf_type'], ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])) { return; } HomeTimelineService::add($this->pid, $this->sid); $ids = FollowerService::localFollowerIds($this->pid); if(!$ids || !count($ids)) { return; } $skipIds = UserFilter::whereFilterableType('App\Profile')->whereFilterableId($status['account']['id'])->whereIn('filter_type', ['mute', 'block'])->pluck('user_id')->toArray(); foreach($ids as $id) { if(!in_array($id, $skipIds)) { HomeTimelineService::add($id, $this->sid); } } } }