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:
Torsten Schulz (local)
2026-03-04 22:44:00 +01:00
parent 3eaf31d64f
commit d620b8f8ae
5 changed files with 342 additions and 9 deletions

View File

@@ -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,
});
}