Enhanced the session management by allowing a reconnect with the same username to replace the existing session, sending a logout message to the previous session. Introduced WebSocket keepalive functionality using Ping/Pong messages to detect stale connections. Updated documentation to reflect these changes and improve user experience during reconnections.
Added additional queries to load user gender from both 'gender' and 'sex' columns, improving the accuracy of gender retrieval. Enhanced debug logging to provide detailed insights into gender loading processes, including raw values and mapped IDs. Updated the `normalize_gender_value` function to handle numeric gender representations, ensuring robust input normalization. This update strengthens gender handling in user interactions and improves troubleshooting capabilities.
Added functionality to load user gender from user parameters, improving the accuracy of gender-based access control. Introduced a new `normalize_gender_value` function to standardize gender inputs and updated the `room_access_allowed` function to utilize configured gender IDs for logging and validation. Enhanced debug logging to include configured gender IDs for better troubleshooting. This update ensures more robust handling of user gender in the application.
Added comprehensive debug logging for room access checks in the `room_access_allowed` function, providing insights into access denial reasons such as missing owner IDs, gender restrictions, and password requirements. This enhancement improves troubleshooting capabilities when debugging is enabled, ensuring clearer feedback on access control decisions.
Introduced a new function, `parse_create_room_args_from_command`, to streamline the parsing of room creation arguments from the command structure. Improved error handling in `handle_create_room_command` to provide detailed debug logging for parsing failures and duplicate room names when debugging is enabled. Enhanced the validation of room creation parameters, including age restrictions and room type, ensuring robust input handling.
Improved error handling in `handle_init_command` and `handle_join_command` to provide clearer feedback when room resolution fails. Added detailed debug logging for room access attempts, including client ID and requested room information, when debugging is enabled. Introduced a new function, `room_debug_enabled`, to toggle debug logging based on environment variables. Updated password validation logic to require a password when one is set for a room.
Introduced the `delete_room` command to allow users to remove temporary chat rooms, with appropriate access checks for room creators and admins. Updated the `RoomMeta` structure to include the `created_by_chat_user_id` field for better tracking of room ownership. Enhanced error handling in room access validation for improved user feedback during room deletion and initialization processes.
Implemented the `create_room` command to allow users to create new chat rooms with customizable settings such as privacy, age restrictions, and ownership. Enhanced room management by introducing functions to mark rooms as occupied or possibly empty, and added cleanup logic for stale temporary rooms. Updated the `RoomMeta` structure to include new fields for room creation timestamps and temporary status, ensuring better room lifecycle management.
Updated the room access logic in `handle_init_command` and `handle_join_command` to improve validation against user rights and room ownership. Introduced new fields in the `RoomMeta` structure for room type and friends-only access. Modified database queries to accommodate these changes, ensuring robust access control based on user relationships and room settings.
Integrated bcrypt for password verification and updated user profile management to include gender and rights handling. Enhanced room access validation to consider gender restrictions and user rights. Updated database queries and structures to support new fields, ensuring compatibility with existing functionalities.
Die Implementierung enthält modulare Command-/State-/DB-Strukturen, DB-basierte Authentifizierung inkl. Rechte- und Raumzugriffsprüfung sowie kompatible Chat- und Dice-Commands.
Made-with: Cursor