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:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user