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