This commit is contained in:
Lizandro Guarnizo
2026-01-24 02:15:54 -05:00
parent ab7299db2c
commit a481a20e9a
4 changed files with 128 additions and 1 deletions
+7 -1
View File
@@ -119,7 +119,13 @@ class ConversationStateService
*/
public function clearState(string $phoneNumber): bool
{
return $this->db->delete('user_states', 'phone_number = :phone', ['phone' => $phoneNumber]);
try {
$this->db->delete('user_states', 'phone_number = :phone', ['phone' => $phoneNumber]);
return true;
} catch (Exception $e) {
error_log('[ConversationStateService] clearState failed: ' . $e->getMessage());
return false;
}
}
/**