up
This commit is contained in:
@@ -20,6 +20,14 @@ try {
|
||||
exit;
|
||||
}
|
||||
|
||||
// Only release hold if there's an active hold/request; otherwise return success quietly
|
||||
$userFlags = $db->fetch('SELECT on_hold, advisor_requested FROM users WHERE id = :id', ['id' => $userId]);
|
||||
if (empty($userFlags) || (empty($userFlags['on_hold']) && empty($userFlags['advisor_requested']))) {
|
||||
// Nothing to release
|
||||
echo json_encode(['success' => true, 'info' => 'no_hold_active']);
|
||||
exit;
|
||||
}
|
||||
|
||||
// Use BotService to release hold (sends notification and clears flags)
|
||||
try {
|
||||
require_once __DIR__ . '/../services/BotService.php';
|
||||
|
||||
Reference in New Issue
Block a user