From 5cafac34c18d0ded89b7363f95e13991751dba60 Mon Sep 17 00:00:00 2001 From: Paulo Castellano Date: Sat, 13 Jun 2026 18:15:31 -0300 Subject: [PATCH] Resolve Bluesky endpoints from config and import Throwable Use the existing config('trypost.platforms.bluesky.public_appview') and default_service keys for the handle-resolution fallbacks instead of hardcoding the hosts, so a self-hosted override (BLUESKY_PUBLIC_APPVIEW) is honored here like it already is in BlueskyAnalytics. Import Throwable instead of referencing it inline. --- app/Services/Social/BlueskyPublisher.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Services/Social/BlueskyPublisher.php b/app/Services/Social/BlueskyPublisher.php index b3a7943e..2fb38557 100644 --- a/app/Services/Social/BlueskyPublisher.php +++ b/app/Services/Social/BlueskyPublisher.php @@ -13,6 +13,7 @@ use Illuminate\Http\Client\Response; use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Log; +use Throwable; class BlueskyPublisher { @@ -284,8 +285,8 @@ private function resolveHandleToDid(string $handle, ?string $service = null, ?So $endpoints = array_values(array_unique(array_filter([ $service, - 'https://public.api.bsky.app', - 'https://bsky.social', + config('trypost.platforms.bluesky.public_appview'), + config('trypost.platforms.bluesky.default_service'), ]))); $lastError = null; @@ -306,7 +307,7 @@ private function resolveHandleToDid(string $handle, ?string $service = null, ?So if (is_string($did) && str_starts_with($did, 'did:')) { return $did; } - } catch (\Throwable $e) { + } catch (Throwable $e) { // Per-endpoint failures are expected during transient outages; // keep them at debug to avoid noisy logs and surface a single // warning below only when every endpoint has been exhausted.