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.
This commit is contained in:
Torsten Schulz (local)
2026-03-04 23:08:22 +01:00
parent d620b8f8ae
commit 553602d5b4
3 changed files with 218 additions and 22 deletions

View File

@@ -219,6 +219,7 @@ pub async fn load_room_configs(config: &ServerConfig) -> Result<Vec<RoomMeta>, &
max_age: row.get::<_, Option<i32>>("max_age"),
is_public: row.get::<_, bool>("is_public"),
owner_id: row.get::<_, Option<i32>>("owner_id"),
created_by_chat_user_id: None,
room_type_id: row.get::<_, Option<i32>>("room_type_id"),
friends_of_owner_only: row.get::<_, bool>("friends_of_owner_only"),
is_temporary: false,