Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct Folder namespaces and CreateFolderResponse structure #36

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

leftmostcat
Copy link
Collaborator

Serialization of CreateFolder and deserialization of CreateFolderResponse were incorrect due to unspecified namespace prefixes on the Folder enum and use of the incorrect type in the response struct.

Comment on lines +826 to 830
#[xml_struct(ns_prefix = "t")]
total_count: Option<u32>,

#[xml_struct(ns_prefix = "t")]
child_folder_count: Option<u32>,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefixing total_count and child_folder_count (as well as unread_count for Folder) is a bit weird since they're explicitly read-only and we should never actually be sending them, but I think it's better to do so, as we might get a specific "these fields are read-only" error instead of the generic 500 we get when we don't specify namespaces correctly.

@leftmostcat
Copy link
Collaborator Author

I've verified that I can successfully create a folder remotely and handle the response with these changes in place.

@leftmostcat leftmostcat merged commit 1b7017d into main Dec 3, 2024
2 checks passed
@leftmostcat leftmostcat deleted the correct-create-folder-structure branch December 3, 2024 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants