You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pixelfed/app/Jobs/InboxPipeline/ActivityHandler.php

49 lines
1.1 KiB
PHTML

<?php
namespace App\Jobs\InboxPipeline;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
Staging (#6264) * StatusPipeline defensive checks * HomeFeedPipeline defensive checks * DeletePipeline defensive checks * InboxPipeline defensive checks * MediaPipeline defensive checks * PushNotificationPipeline defensive checks * LikePipeline defensive checks * FollowPipeline defensive checks * ImageOptimizePipeline defensive checks * Misc pipelines defensive checks * Update CommentPipeline.php * Update FollowPushNotifyPipeline.php * Update LikePushNotifyPipeline.php * Update FollowPushNotifyPipeline.php * Update MentionPushNotifyPipeline.php * Update MoveSendUndoFollowPipeline.php * Update RemoteFollowPipeline.php * Update FollowPushNotifyPipeline.php * Update LikePushNotifyPipeline.php * Update MentionPushNotifyPipeline.php * Update Site/Config.php - config_cache only has 1 arg. No fallback. * Update Bouncer.php - Called 'count' on Laravel collection, but could have been retrieved as a query. 🪪 larastan.noUnnecessaryCollectionCall * Update Status.php - Missing use App\Models\Conversation; * Larastan: Update UndoSharePipeline.php (Undefined variable: $status) * Update ResilientMediaStorageService.php * Update ImageS3UploadPipeline.php * Larastan: Update Profile.php missing "use App\Avatar;" * Larastan: Update MediaStorageService.php * Larastan: Update MediaPathService.php * Update MediaPathService.php * Update MediaStorageService.php * Update ImageS3UploadPipeline.php * Larastan: Update AddUserDomainBlock.php ``` ------ ------------------------------------------------------------- Line Console/Commands/AddUserDomainBlock.php ------ ------------------------------------------------------------- 37 Variable $domain in empty() always exists and is not falsy. 🪪 empty.variable ------ ------------------------------------------------------------- ``` * Larastan: Update CatchUnoptimizedMedia.php ``` ------ ------------------------------------------------------------------------------------------------- Line Console/Commands/CatchUnoptimizedMedia.php ------ ------------------------------------------------------------------------------------------------- 31 Constructor of class App\Console\Commands\CatchUnoptimizedMedia has an unused parameter $media. 🪪 constructor.unusedParameter ------ ------------------------------------------------------------------------------------------------- ``` * Update DeleteUserDomainBlock.php * Update StatusHashtag.php * Update FixLikes.php * Update User.php * Update Installer.php * Update SeedFollows.php * Update DiscoverCategory.php * Update FollowRequest.php * Update Follower.php * Update AccountController.php * Update CustomFilterKeyword.php * Update FederationController.php * Update Inbox.php * Update HttpSignature.php --------- Co-authored-by: Your Name <you@example.com> Co-authored-by: Shlee <github@shl.ee>
11 months ago
use Illuminate\Support\Facades\Log;
use App\Util\ActivityPub\Inbox;
class ActivityHandler implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
protected $username;
protected $headers;
protected $payload;
public $timeout = 300;
public $tries = 1;
public $maxExceptions = 1;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($headers, $username, $payload)
{
$this->username = $username;
$this->headers = $headers;
$this->payload = $payload;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
Fix federation (#6346) * Prepared new docker * Docker setup improvements and fixes * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update .dockerignore * DB/Redis health check * updated health checks * updated install guide * updated DOCKER_SETUP * Updated DOCKER_SETUP * Updated DOCKER_SETUP * Update and rename DOCKER_SETUP.md to DOCKER_COMPOSE_SETUP.md * RemoveUnreachableStatementRector * Update GroupActivityPubService.php * Larastan: Add @property * Delete rector.php * more properties * 2fa_enabled needs to be refactored * Fix AdminUser.php syntax error - remove invalid property declaration * Update AdminUser.php * update * Upgrade predis from v2.0 to v3.2 - Update predis/predis from ^2.0 to ^3.2 - Predis v3.2.0 includes RESP3 support, improved pipeline abstractions - No code changes required, configuration remains compatible - Tested successfully with tinker * Upgrade predis from v2.0 to v3.2 * Update * Update .env.docker.example * Update DOCKER_COMPOSE_SETUP.md * Create ImageDriverManager.php * Update image.php * Update ImageResizePipeline.php * Update StoryComposeController.php * Update AvatarOptimize.php * Update Image.php * Update composer.json * Update AvatarOptimize.php * update lock * Update composer.lock * update * update * update * Allow to set new image types in admin interface * Update composer, fix deps * Update composer * Update DOCKER_COMPOSE_SETUP.md - Added troubleshooting (#6344) * Staging (#6343) * Prepared new docker * Docker setup improvements and fixes * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update DOCKER_SETUP.md * Update .dockerignore * DB/Redis health check * updated health checks * updated install guide * updated DOCKER_SETUP * Updated DOCKER_SETUP * Updated DOCKER_SETUP * Update and rename DOCKER_SETUP.md to DOCKER_COMPOSE_SETUP.md * RemoveUnreachableStatementRector * Update GroupActivityPubService.php * Larastan: Add @property * Delete rector.php * more properties * 2fa_enabled needs to be refactored * Fix AdminUser.php syntax error - remove invalid property declaration * Update AdminUser.php * update * Upgrade predis from v2.0 to v3.2 - Update predis/predis from ^2.0 to ^3.2 - Predis v3.2.0 includes RESP3 support, improved pipeline abstractions - No code changes required, configuration remains compatible - Tested successfully with tinker * Upgrade predis from v2.0 to v3.2 * Update * Update .env.docker.example * Update DOCKER_COMPOSE_SETUP.md * Create ImageDriverManager.php * Update image.php * Update ImageResizePipeline.php * Update StoryComposeController.php * Update AvatarOptimize.php * Update Image.php * Update composer.json * Update AvatarOptimize.php * update lock * Update composer.lock * update * update * update * Allow to set new image types in admin interface * Update composer, fix deps * Update composer --------- Co-authored-by: Shlee <github@shl.ee> Co-authored-by: Your Name <you@example.com> Co-authored-by: Severin <savewish@icloud.com> * Update DOCKER_COMPOSE_SETUP.md * Update DOCKER_COMPOSE_SETUP.md --------- Co-authored-by: dansup <danielsupernault@gmail.com> Co-authored-by: Your Name <you@example.com> Co-authored-by: Severin <savewish@icloud.com> * Regression - Fix federation - Update ActivityHandler.php (#6345) * Update ActivityHandler.php * Update ActivityHandler.php * Revert inbox changes * Fix InboxWorker --------- Co-authored-by: Shlee <github@shl.ee> Co-authored-by: Your Name <you@example.com> Co-authored-by: Severin <savewish@icloud.com>
10 months ago
(new Inbox($this->headers, $this->username, $this->payload))->handle();
return;
}
}