NASER fix send bale message

This commit is contained in:
Montzar.ah.01
2026-04-27 16:48:01 +00:00
parent a285bcceac
commit d1d092359e
2 changed files with 13 additions and 2 deletions
+2 -2
View File
@@ -60,7 +60,7 @@ namespace App\Http\Controllers;
$message = "{$user} درخواست {$data} ثبت کرد.";
}
$admins = User::whereIn('is_admin', [1,2])->whereNotNull('chatid')->select('chatid', 'bale', 'user_name')->get();
$admins = User::whereIn('is_admin', [1,2])->whereNotNull('bale')->select('chatid', 'bale', 'user_name')->get();
if ($_COOKIE['user_identity'] !== 'test') {
foreach ($admins as $admin) {
if (!$admin->bale) {continue;}
@@ -73,7 +73,7 @@ namespace App\Http\Controllers;
if ($admin->bale) {
try {
$response = Http::withoutVerifying()->post('https://tapi.bale.ai/1482838710:sYbLzby0tuLRzHvP4d3LsbcNwg2sjSDLTAU/sendMessage', [
"chat_id" => $admin->bale,
"chat_id" => (string)$admin->bale,
'text' => $message,
]);
}catch (\Exception $e){}