16 Commits

Author SHA1 Message Date
Torsten Schulz (local)
8b9947cc03 Implement session replacement and WebSocket keepalive features
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.
2026-03-05 08:03:15 +01:00
Torsten Schulz (local)
92ae7d614e Enhance user gender loading and debugging in database interactions
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.
2026-03-05 00:00:07 +01:00
Torsten Schulz (local)
37767e59a0 Implement user gender handling and enhance gender-based access validation
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.
2026-03-04 23:54:49 +01:00
Torsten Schulz (local)
a09926f48a Enhance room access validation with detailed debug logging
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.
2026-03-04 23:47:02 +01:00
Torsten Schulz (local)
4cf5f2f713 Refactor room creation argument parsing and enhance error handling
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.
2026-03-04 23:41:32 +01:00
Torsten Schulz (local)
8285466ba2 Enhance room access validation and debugging in command 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.
2026-03-04 23:30:26 +01:00
Torsten Schulz (local)
553602d5b4 Add delete room command and enhance room management in yourchat2
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.
2026-03-04 23:08:22 +01:00
Torsten Schulz (local)
d620b8f8ae Add create room command and room management enhancements in yourchat2
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.
2026-03-04 22:44:00 +01:00
Torsten Schulz (local)
3eaf31d64f Enhance room access validation and database structure in yourchat2
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.
2026-03-04 22:35:16 +01:00
Torsten Schulz (local)
fbbb698ed9 Add bcrypt password hashing and user gender handling in yourchat2
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.
2026-03-04 18:30:59 +01:00
Torsten Schulz (local)
9478e6a91a Enhance README with CLI room checking instructions and implement room name resolution in command handling. Updated handle_init_command and handle_join_command to use resolved room names, improving room access validation. Added CLI command handling in main.rs to list available rooms from the database or fallback configuration. 2026-03-04 17:55:53 +01:00
Torsten Schulz (local)
aca290f1d0 Implement TLS support for WebSocket connections in yourchat2. Updated main.rs to handle secure WebSocket connections based on environment variables. Enhanced install-systemd.sh to include a template for environment configuration. Updated README to document new TLS-related environment variables and installation instructions. 2026-03-04 17:42:47 +01:00
Torsten Schulz (local)
0037ac5c28 Update install-systemd.sh to enhance the build process. Changed the build command to use a subshell for better directory context and updated the progress indicator from [1/6] to [1/7]. 2026-03-04 17:24:43 +01:00
Torsten Schulz (local)
91a58855eb Refactor install-systemd.sh and update yourchat2.service for improved installation and configuration. Added binary installation to /usr/local/bin, created work directory at /var/lib/yourchat2, and updated user/group settings. Enhanced README to reflect these changes. 2026-03-04 17:23:29 +01:00
Torsten Schulz (local)
5c4ac55f61 Update README and systemd service configuration for yourchat2. Added installation script install-systemd.sh for easier setup and modified yourchat2.service to improve service management, including environment file support and enhanced restart policies. 2026-03-04 17:21:03 +01:00
Torsten Schulz (local)
0b91b94ae1 Initialisiere yourchat2 als eigenständigen Rust-Chatdienst und portiere die Kernfunktionen aus der Altanwendung.
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
2026-03-04 17:04:41 +01:00