NASER fix send bale message
This commit is contained in:
@@ -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){}
|
||||
|
||||
Reference in New Issue
Block a user