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.
This commit is contained in:
Torsten Schulz (local)
2026-03-04 22:35:16 +01:00
parent fbbb698ed9
commit 3eaf31d64f
3 changed files with 216 additions and 44 deletions

View File

@@ -93,4 +93,6 @@ pub(crate) struct RoomMeta {
pub(crate) max_age: Option<i32>,
pub(crate) is_public: bool,
pub(crate) owner_id: Option<i32>,
pub(crate) room_type_id: Option<i32>,
pub(crate) friends_of_owner_only: bool,
}