Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.
PHP ai-agentsblueskyfacebookinstagramlaravellinkedinmastodonmcpmcp-serveropen-sourcerest-apiself-hostedsocial-mediasocial-media-managementsocial-media-schedulerthreadstiktokvuejsxyoutube
refactor(social): TokenRedactor::redact accepts nullable
Paulo Castellano123996bbc0c4
diff --git a/app/Exceptions/Social/SocialPublishException.php b/app/Exceptions/Social/SocialPublishException.phpindex 8d0077289..2af283821 100644--- a/app/Exceptions/Social/SocialPublishException.php+++ b/app/Exceptions/Social/SocialPublishException.php@@ -28,7 +28,7 @@ abstract class SocialPublishException extends RuntimeException'category' => $this->category->value,'platform_error_code' => $this->platformErrorCode,'user_message' => $this->userMessage,- 'raw_response' => $this->rawResponse !== null ? TokenRedactor::redact($this->rawResponse) : null,+ 'raw_response' => TokenRedactor::redact($this->rawResponse),];}diff --git a/app/Services/Social/TokenRedactor.php b/app/Services/Social/TokenRedactor.phpindex bc1540480..8da132e5a 100644--- a/app/Services/Social/TokenRedactor.php+++ b/app/Services/Social/TokenRedactor.php@@ -12,8 +12,12 @@ namespace App\Services\Social;*/class TokenRedactor{- public static function redact(string $body): string+ public static function redact(?string $body): ?string{+ if ($body === null) {+ return null;+ }+return preg_replace(['/access_token=([^&"\s]+)/',