SharedInboxWorker.php 886 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace App\Jobs\InboxPipeline;
  3. use App\Profile;
  4. use App\Util\ActivityPub\Inbox;
  5. use Illuminate\Bus\Queueable;
  6. use Illuminate\Queue\SerializesModels;
  7. use Illuminate\Queue\InteractsWithQueue;
  8. use Illuminate\Contracts\Queue\ShouldQueue;
  9. use Illuminate\Foundation\Bus\Dispatchable;
  10. class SharedInboxWorker implements ShouldQueue
  11. {
  12. use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
  13. protected $request;
  14. protected $profile;
  15. protected $payload;
  16. /**
  17. * Create a new job instance.
  18. *
  19. * @return void
  20. */
  21. public function __construct($request, $payload)
  22. {
  23. $this->request = $request;
  24. $this->payload = $payload;
  25. }
  26. /**
  27. * Execute the job.
  28. *
  29. * @return void
  30. */
  31. public function handle()
  32. {
  33. (new Inbox($this->request, null, $this->payload))->handleSharedInbox();
  34. }
  35. }