1
0
Fork 0
forked from mirror/pixelfed

Update StatusEntityLexer, only add specific status types to PublicTimelineService

This commit is contained in:
Daniel Supernault 2021-07-07 01:53:28 -06:00
parent f09845bc0b
commit 1fdcbe5bf9
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -150,17 +150,24 @@ class StatusEntityLexer implements ShouldQueue
public function deliver()
{
$status = $this->status;
$types = [
'photo',
'photo:album',
'video',
'video:album',
'photo:video:album'
];
if(config_cache('pixelfed.bouncer.enabled')) {
Bouncer::get($status);
}
if($status->uri == null && $status->scope == 'public') {
if($status->uri == null && $status->scope == 'public' && in_array($status->type, $types)) {
PublicTimelineService::add($status->id);
}
if(config_cache('federation.activitypub.enabled') == true && config('app.env') == 'production') {
StatusActivityPubDeliver::dispatch($this->status);
StatusActivityPubDeliver::dispatch($status);
}
}
}