Files
vanessa_bot_vanity/app/modules/database.py
google-labs-jules[bot] 27023348b4 feat: Disable user registration persistence
This change modifies the mock database module to make the bot completely stateless regarding user registration.

- The `chat_id_exists` function now always returns `False`.
- The `register_user` function is now a no-op, returning `True` without storing any data.

This allows the registration flow to be run repeatedly for testing purposes, as requested by the user.
2025-12-23 19:39:11 +00:00

21 lines
597 B
Python

import logging
# MOCK DATABASE MODULE
# Since the actual DB is removed temporarily, this module provides mock implementations.
SessionUsersAlma = None
SessionVanityHr = None
SessionVanityAttendance = None
_REGISTERED_USERS = set()
def chat_id_exists(chat_id: int) -> bool:
"""Mock check: returns True if user is in in-memory set."""
return False
def register_user(user_data: dict) -> bool:
"""Mock register: adds user to in-memory set."""
# This function is now a no-op to ensure statelessness.
# It always returns True to not break the conversation flow.
return True