|
|
|
@ -11,6 +11,7 @@ use Illuminate\Queue\SerializesModels;
|
|
|
|
|
use Illuminate\Queue\Middleware\WithoutOverlapping;
|
|
|
|
|
use Illuminate\Contracts\Queue\ShouldBeUniqueUntilProcessing;
|
|
|
|
|
use App\UserFilter;
|
|
|
|
|
use App\Models\UserDomainBlock;
|
|
|
|
|
use App\Services\FollowerService;
|
|
|
|
|
use App\Services\HomeTimelineService;
|
|
|
|
|
use App\Services\StatusService;
|
|
|
|
@ -69,7 +70,7 @@ class FeedInsertRemotePipeline implements ShouldQueue, ShouldBeUniqueUntilProces
|
|
|
|
|
$sid = $this->sid;
|
|
|
|
|
$status = StatusService::get($sid, false);
|
|
|
|
|
|
|
|
|
|
if(!$status || !isset($status['account']) || !isset($status['account']['id'])) {
|
|
|
|
|
if(!$status || !isset($status['account']) || !isset($status['account']['id'], $status['url'])) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -83,7 +84,24 @@ class FeedInsertRemotePipeline implements ShouldQueue, ShouldBeUniqueUntilProces
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$skipIds = UserFilter::whereFilterableType('App\Profile')->whereFilterableId($status['account']['id'])->whereIn('filter_type', ['mute', 'block'])->pluck('user_id')->toArray();
|
|
|
|
|
$domain = strtolower(parse_url($status['url'], PHP_URL_HOST));
|
|
|
|
|
$skipIds = [];
|
|
|
|
|
|
|
|
|
|
if(strtolower(config('pixelfed.domain.app')) !== $domain) {
|
|
|
|
|
$skipIds = UserDomainBlock::where('domain', $domain)->pluck('profile_id')->toArray();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$filters = UserFilter::whereFilterableType('App\Profile')
|
|
|
|
|
->whereFilterableId($status['account']['id'])
|
|
|
|
|
->whereIn('filter_type', ['mute', 'block'])
|
|
|
|
|
->pluck('user_id')
|
|
|
|
|
->toArray();
|
|
|
|
|
|
|
|
|
|
if($filters && count($filters)) {
|
|
|
|
|
$skipIds = array_merge($skipIds, $filters);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$skipIds = array_unique(array_values($skipIds));
|
|
|
|
|
|
|
|
|
|
foreach($ids as $id) {
|
|
|
|
|
if(!in_array($id, $skipIds)) {
|
|
|
|
|