mirror of
https://github.com/marcogll/vanessa_bot_vanity.git
synced 2026-01-13 13:25:16 +00:00
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.
21 lines
597 B
Python
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
|