mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-19 21:11:26 +00:00
commit
d384ae3669
2 changed files with 4 additions and 2 deletions
|
@ -17,6 +17,7 @@ use Illuminate\Queue\SerializesModels;
|
|||
use App\Jobs\DeletePipeline\DeleteRemoteProfilePipeline;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Http\Client\ConnectionException;
|
||||
use Illuminate\Support\Lottery;
|
||||
|
||||
class InboxValidator implements ShouldQueue
|
||||
{
|
||||
|
@ -81,7 +82,8 @@ class InboxValidator implements ShouldQueue
|
|||
if(isset($payload['type']) && in_array($payload['type'], ['Follow', 'Accept']) ) {
|
||||
ActivityHandler::dispatch($headers, $profile, $payload)->onQueue('follow');
|
||||
} else {
|
||||
ActivityHandler::dispatch($headers, $profile, $payload)->onQueue('inbox');
|
||||
$onQueue = Lottery::odds(1, 12)->winner(fn () => 'high')->loser(fn () => 'inbox')->choose();
|
||||
ActivityHandler::dispatch($headers, $profile, $payload)->onQueue($onQueue);
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
|
|
|
@ -66,7 +66,7 @@ class InboxWorker implements ShouldQueue
|
|||
}
|
||||
|
||||
if($this->verifySignature($headers, $payload) == true) {
|
||||
ActivityHandler::dispatch($headers, $profile, $payload)->onQueue('inbox');
|
||||
ActivityHandler::dispatch($headers, $profile, $payload)->onQueue('shared');
|
||||
return;
|
||||
} else {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue