This commit is contained in:
Lizandro Guarnizo
2026-01-25 22:49:13 -05:00
parent e2c8fc994a
commit 95125a6708
10 changed files with 420 additions and 41 deletions
+6 -1
View File
@@ -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();