1
0
Fork 0
forked from mirror/pixelfed

Update AP Inbox

This commit is contained in:
Daniel Supernault 2024-09-30 05:12:52 -06:00
parent bae0632e34
commit cc897bc427
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

@ -15,6 +15,7 @@ use App\Jobs\MovePipeline\MoveMigrateFollowersPipeline;
use App\Jobs\MovePipeline\ProcessMovePipeline;
use App\Jobs\MovePipeline\UnfollowLegacyAccountMovePipeline;
use App\Jobs\ProfilePipeline\HandleUpdateActivity;
use App\Jobs\PushNotificationPipeline\MentionPushNotifyPipeline;
use App\Jobs\StatusPipeline\RemoteStatusDelete;
use App\Jobs\StatusPipeline\StatusRemoteUpdatePipeline;
use App\Jobs\StoryPipeline\StoryExpire;
@ -27,7 +28,9 @@ use App\Notification;
use App\Profile;
use App\Services\AccountService;
use App\Services\FollowerService;
use App\Services\NotificationAppGatewayService;
use App\Services\PollService;
use App\Services\PushNotificationService;
use App\Services\ReblogService;
use App\Services\UserFilterService;
use App\Status;
@ -242,7 +245,7 @@ class Inbox
$cc = isset($activity['cc']) ? $activity['cc'] : [];
if ($activity['type'] == 'Question') {
$this->handlePollCreate();
//$this->handlePollCreate();
return;
}
@ -531,6 +534,15 @@ class Inbox
$notification->item_id = $dm->id;
$notification->item_type = "App\DirectMessage";
$notification->save();
if (NotificationAppGatewayService::enabled()) {
if (PushNotificationService::check('mention', $profile->id)) {
$user = User::whereProfileId($profile->id)->first();
if ($user && $user->expo_token && $user->notify_enabled) {
MentionPushNotifyPipeline::dispatch($user->expo_token, $actor->username)->onQueue('pushnotify');
}
}
}
}
}