diff --git a/app/Actions/SocialAccount/ConnectTelegramChannel.php b/app/Actions/SocialAccount/ConnectTelegramChannel.php index 68d945be..3743a113 100644 --- a/app/Actions/SocialAccount/ConnectTelegramChannel.php +++ b/app/Actions/SocialAccount/ConnectTelegramChannel.php @@ -10,7 +10,7 @@ use App\Features\SocialAccountLimit; use App\Models\SocialAccount; use App\Models\Workspace; -use App\Services\Social\TelegramApi; +use App\Services\Social\Telegram\TelegramApi; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Http; use Laravel\Pennant\Feature; diff --git a/app/Actions/SocialAccount/RegisterTelegramWebhook.php b/app/Actions/SocialAccount/RegisterTelegramWebhook.php index fbbd6206..68d12ddc 100644 --- a/app/Actions/SocialAccount/RegisterTelegramWebhook.php +++ b/app/Actions/SocialAccount/RegisterTelegramWebhook.php @@ -4,7 +4,7 @@ namespace App\Actions\SocialAccount; -use App\Services\Social\TelegramApi; +use App\Services\Social\Telegram\TelegramApi; use Illuminate\Support\Facades\Http; use InvalidArgumentException; use RuntimeException; diff --git a/app/Http/Controllers/App/AnalyticsController.php b/app/Http/Controllers/App/AnalyticsController.php index 084554b7..aee64aad 100644 --- a/app/Http/Controllers/App/AnalyticsController.php +++ b/app/Http/Controllers/App/AnalyticsController.php @@ -11,7 +11,7 @@ use App\Services\Social\InstagramAnalytics; use App\Services\Social\LinkedInPageAnalytics; use App\Services\Social\PinterestAnalytics; -use App\Services\Social\TelegramAnalytics; +use App\Services\Social\Telegram\TelegramAnalytics; use App\Services\Social\ThreadsAnalytics; use App\Services\Social\TikTokAnalytics; use App\Services\Social\XAnalytics; diff --git a/app/Http/Controllers/Auth/TelegramController.php b/app/Http/Controllers/Auth/TelegramController.php index 329bf8a1..e24fa9cf 100644 --- a/app/Http/Controllers/Auth/TelegramController.php +++ b/app/Http/Controllers/Auth/TelegramController.php @@ -5,7 +5,7 @@ namespace App\Http\Controllers\Auth; use App\Enums\SocialAccount\Platform as SocialPlatform; -use App\Services\Social\TelegramConnectCode; +use App\Services\Social\Telegram\TelegramConnectCode; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Symfony\Component\HttpFoundation\Response as SymfonyResponse; diff --git a/app/Http/Controllers/Webhooks/TelegramWebhookController.php b/app/Http/Controllers/Webhooks/TelegramWebhookController.php index c823a072..d00e8717 100644 --- a/app/Http/Controllers/Webhooks/TelegramWebhookController.php +++ b/app/Http/Controllers/Webhooks/TelegramWebhookController.php @@ -8,7 +8,7 @@ use App\Actions\SocialAccount\StoreTelegramReactions; use App\Http\Controllers\Controller; use App\Models\Workspace; -use App\Services\Social\TelegramConnectCode; +use App\Services\Social\Telegram\TelegramConnectCode; use Illuminate\Http\Request; use Illuminate\Http\Response; use Symfony\Component\HttpFoundation\Response as SymfonyResponse; diff --git a/app/Jobs/PublishToSocialPlatform.php b/app/Jobs/PublishToSocialPlatform.php index e163a90d..e4d494d1 100644 --- a/app/Jobs/PublishToSocialPlatform.php +++ b/app/Jobs/PublishToSocialPlatform.php @@ -25,7 +25,7 @@ use App\Services\Social\LinkedInPublisher; use App\Services\Social\MastodonPublisher; use App\Services\Social\PinterestPublisher; -use App\Services\Social\TelegramPublisher; +use App\Services\Social\Telegram\TelegramPublisher; use App\Services\Social\ThreadsPublisher; use App\Services\Social\TikTokPublisher; use App\Services\Social\XPublisher; diff --git a/app/Services/Post/PostMetricsFetcher.php b/app/Services/Post/PostMetricsFetcher.php index 78a5bb55..de26dff9 100644 --- a/app/Services/Post/PostMetricsFetcher.php +++ b/app/Services/Post/PostMetricsFetcher.php @@ -13,7 +13,7 @@ use App\Services\Social\LinkedInPageAnalytics; use App\Services\Social\MastodonAnalytics; use App\Services\Social\PinterestAnalytics; -use App\Services\Social\TelegramAnalytics; +use App\Services\Social\Telegram\TelegramAnalytics; use App\Services\Social\ThreadsAnalytics; use App\Services\Social\XAnalytics; use App\Services\Social\YouTubeAnalytics; diff --git a/app/Services/Social/ConnectionVerifier.php b/app/Services/Social/ConnectionVerifier.php index 400d079e..79ea1d50 100644 --- a/app/Services/Social/ConnectionVerifier.php +++ b/app/Services/Social/ConnectionVerifier.php @@ -8,6 +8,7 @@ use App\Exceptions\PlatformUnavailableException; use App\Exceptions\TokenExpiredException; use App\Models\SocialAccount; +use App\Services\Social\Telegram\TelegramApi; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Http; diff --git a/app/Services/Social/TelegramAnalytics.php b/app/Services/Social/Telegram/TelegramAnalytics.php similarity index 97% rename from app/Services/Social/TelegramAnalytics.php rename to app/Services/Social/Telegram/TelegramAnalytics.php index 35d5a0d4..9e0cdd71 100644 --- a/app/Services/Social/TelegramAnalytics.php +++ b/app/Services/Social/Telegram/TelegramAnalytics.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Services\Social; +namespace App\Services\Social\Telegram; use App\Models\PostPlatform; use App\Models\SocialAccount; diff --git a/app/Services/Social/TelegramApi.php b/app/Services/Social/Telegram/TelegramApi.php similarity index 96% rename from app/Services/Social/TelegramApi.php rename to app/Services/Social/Telegram/TelegramApi.php index 1d9d0dd5..dbe5d412 100644 --- a/app/Services/Social/TelegramApi.php +++ b/app/Services/Social/Telegram/TelegramApi.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Services\Social; +namespace App\Services\Social\Telegram; /** * Builds Telegram Bot API URLs from the configured token + host, so the diff --git a/app/Services/Social/TelegramConnectCode.php b/app/Services/Social/Telegram/TelegramConnectCode.php similarity index 97% rename from app/Services/Social/TelegramConnectCode.php rename to app/Services/Social/Telegram/TelegramConnectCode.php index fe34e23b..c8ad463c 100644 --- a/app/Services/Social/TelegramConnectCode.php +++ b/app/Services/Social/Telegram/TelegramConnectCode.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Services\Social; +namespace App\Services\Social\Telegram; use Carbon\CarbonInterface; use Illuminate\Contracts\Encryption\DecryptException; diff --git a/app/Services/Social/TelegramMediaType.php b/app/Services/Social/Telegram/TelegramMediaType.php similarity index 95% rename from app/Services/Social/TelegramMediaType.php rename to app/Services/Social/Telegram/TelegramMediaType.php index b4f19211..d7b881b3 100644 --- a/app/Services/Social/TelegramMediaType.php +++ b/app/Services/Social/Telegram/TelegramMediaType.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Services\Social; +namespace App\Services\Social\Telegram; use App\DataTransferObjects\MediaItem; diff --git a/app/Services/Social/TelegramPublisher.php b/app/Services/Social/Telegram/TelegramPublisher.php similarity index 98% rename from app/Services/Social/TelegramPublisher.php rename to app/Services/Social/Telegram/TelegramPublisher.php index 997d1fb8..7a589da1 100644 --- a/app/Services/Social/TelegramPublisher.php +++ b/app/Services/Social/Telegram/TelegramPublisher.php @@ -2,13 +2,14 @@ declare(strict_types=1); -namespace App\Services\Social; +namespace App\Services\Social\Telegram; use App\DataTransferObjects\MediaItem; use App\Exceptions\Social\TelegramPublishException; use App\Models\PostPlatform; use App\Models\SocialAccount; use App\Services\Social\Concerns\HasSocialHttpClient; +use App\Services\Social\ContentSanitizer; use Illuminate\Http\Client\Response; use Illuminate\Support\Collection; diff --git a/tests/Feature/Services/Social/TelegramAnalyticsTest.php b/tests/Feature/Services/Social/TelegramAnalyticsTest.php index cfd215a1..e3fb8047 100644 --- a/tests/Feature/Services/Social/TelegramAnalyticsTest.php +++ b/tests/Feature/Services/Social/TelegramAnalyticsTest.php @@ -5,7 +5,7 @@ use App\Enums\SocialAccount\Platform; use App\Models\PostPlatform; use App\Models\SocialAccount; -use App\Services\Social\TelegramAnalytics; +use App\Services\Social\Telegram\TelegramAnalytics; use Illuminate\Support\Facades\Http; beforeEach(function () { diff --git a/tests/Feature/Services/Social/TelegramPublisherTest.php b/tests/Feature/Services/Social/TelegramPublisherTest.php index 43be60be..7e50ceb5 100644 --- a/tests/Feature/Services/Social/TelegramPublisherTest.php +++ b/tests/Feature/Services/Social/TelegramPublisherTest.php @@ -10,7 +10,7 @@ use App\Models\SocialAccount; use App\Models\User; use App\Models\Workspace; -use App\Services\Social\TelegramPublisher; +use App\Services\Social\Telegram\TelegramPublisher; use Illuminate\Support\Facades\Http; beforeEach(function () { diff --git a/tests/Feature/Social/TelegramConnectionTest.php b/tests/Feature/Social/TelegramConnectionTest.php index 767f4375..198b4ddf 100644 --- a/tests/Feature/Social/TelegramConnectionTest.php +++ b/tests/Feature/Social/TelegramConnectionTest.php @@ -11,7 +11,7 @@ use App\Models\User; use App\Models\Workspace; use App\Services\Social\ConnectionVerifier; -use App\Services\Social\TelegramConnectCode; +use App\Services\Social\Telegram\TelegramConnectCode; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Storage; diff --git a/tests/Unit/Services/Social/TelegramApiTest.php b/tests/Unit/Services/Social/TelegramApiTest.php index bcab8ef5..8ae35841 100644 --- a/tests/Unit/Services/Social/TelegramApiTest.php +++ b/tests/Unit/Services/Social/TelegramApiTest.php @@ -2,7 +2,7 @@ declare(strict_types=1); -use App\Services\Social\TelegramApi; +use App\Services\Social\Telegram\TelegramApi; beforeEach(function () { config([