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.
This commit is contained in:
@@ -221,6 +221,9 @@ pub async fn load_room_configs(config: &ServerConfig) -> Result<Vec<RoomMeta>, &
|
||||
owner_id: row.get::<_, Option<i32>>("owner_id"),
|
||||
room_type_id: row.get::<_, Option<i32>>("room_type_id"),
|
||||
friends_of_owner_only: row.get::<_, bool>("friends_of_owner_only"),
|
||||
is_temporary: false,
|
||||
created_at_unix: None,
|
||||
empty_since_unix: None,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user