fix jibit error

This commit is contained in:
2026-08-03 13:47:01 +03:30
parent d360539208
commit 9a4a1fec66
2 changed files with 11 additions and 4 deletions
@@ -17,6 +17,7 @@ class PriceChannelTest extends Command
$this->line('');
$this->info('=== وضعیت ارسال قیمت به کانال ===');
$this->line('دسترسی دیپلوی (price_channel_access): ' . (($info['access'] ?? false) ? 'بله' : 'خیر'));
$this->line('قابلیت روشن (price_channel_enabled): ' . ($info['enabled'] ? 'بله' : 'خیر'));
$this->line('پیام‌رسان‌های انتخاب‌شده: ' . (implode(', ', $info['selected_messengers']) ?: '— (خالی)'));
$this->line('حداقل فاصله ارسال (ثانیه): ' . $info['min_seconds']);
@@ -79,6 +80,10 @@ class PriceChannelTest extends Command
{
$blocked = false;
if (! ($info['access'] ?? false)) {
$this->warn('⚠ price_channel_access خاموش است — در تنظیمات پیشرفته روشنش کن.');
$blocked = true;
}
if (! $info['enabled']) {
$this->warn('⚠ price_channel_enabled خاموش است — روشنش کن.');
$blocked = true;
@@ -786,11 +786,13 @@ TXT;
private function sendTelegram(string $token, string $chatId, string $message): \Illuminate\Http\Client\Response
{
// تلگرام مستقیم از سرور اغلب فیلتر است — از پروکسی wwwapp استفاده می‌شود (مثل کد قدیمی)
return Http::withOptions(Controller::httpClientOptions())
->timeout(6)
->post("https://api.telegram.org/bot{$token}/sendMessage", [
'chat_id' => $chatId,
'text' => $message,
->get('https://api.wwwapp.ir/telegran_send.php', [
'chatId' => $chatId,
'message' => $message,
'botToken' => $token,
]);
}
@@ -862,12 +864,12 @@ TXT;
return max(0, $minSeconds - (now()->timestamp - $lastSent));
}
/** @return array<int, string> */
private function hasPriceChannelAccess(): bool
{
return $this->config->getBool('price_channel_access', false);
}
/** @return array<int, string> */
private function parseList(string $raw): array
{
$parts = preg_split('/[,\n]+/', trim($raw)) ?: [];