api(rust): Add api endpoint get_status_update#4468
Conversation
|
I can't really comment on the API itself because I'm not involved with Webxdc a lot, so @link2xt will have to do this. |
get_status_update
link2xt
left a comment
There was a problem hiding this comment.
Looks good, but many unrelated changes piggybacked in the PR without any explanation why they are needed.
| #[derive(Debug, Deserialize, Default)] | ||
| #[non_exhaustive] | ||
| struct WebxdcManifest { | ||
| pub struct WebxdcManifest { |
There was a problem hiding this comment.
Making this public seems to be a completely unrelated change, not needed for get_status_update at all, but will not be reflected in the changelog.
|
|
||
| /// Update items as sent on the wire and as stored in the database. | ||
| #[derive(Debug, Serialize, Deserialize)] | ||
| #[derive(Debug, Serialize, Deserialize, Default)] |
There was a problem hiding this comment.
Default derivation is also an unrelated refactoring
src/webxdc.rs
Outdated
| Ok(status_update_serial) | ||
| } | ||
|
|
||
| /// Return the update_item with `status_update_serial` from the webxdc with message id `msg_id`. |
There was a problem hiding this comment.
Double space in the beginning.
Should start with "Returns", not "Return".
What is update_item? It is some database column, an implementation detail, does not explain what you will get.
Ideally should use the terminology from https://docs.webxdc.org/spec.html, there it is called just an "update".
| request_internet_access: None, | ||
| } | ||
| }; | ||
| let mut manifest = get_blob(&mut archive, "manifest.toml") |
There was a problem hiding this comment.
refactoring based on the default derivement
|
Was originally just a toy branch for me, I can create a new Branch an Pr if you prefer. |
Does not matter that much, also ok to merge as a single commit after fixing the doc comment. I'll try to make a release soon anyway and hope not to forget to document the changes manually when making a release. |
|
cargo-deny check is fixed on |
Some small core-changes I made while working on the appstore-bot.
To be able to close webxdc/store#35 we need to merge this changes into core or change the bot to not use the new apis.