up
This commit is contained in:
+6
-1
@@ -22,7 +22,12 @@ try {
|
||||
|
||||
$operator = $_SESSION['admin_user'] ?? null;
|
||||
$operatorId = $operator['id'] ?? null;
|
||||
|
||||
// Guard: do not set attend if already in_service
|
||||
$cur = $db->fetch('SELECT in_service FROM users WHERE id = ?', [$userId]);
|
||||
if (!empty($cur['in_service'])) {
|
||||
echo json_encode(['success' => false, 'error' => 'La conversación ya está en servicio']);
|
||||
exit;
|
||||
}
|
||||
try {
|
||||
require_once __DIR__ . '/../services/BotService.php';
|
||||
$bot = new BotService();
|
||||
|
||||
Reference in New Issue
Block a user