diff --git a/.changes/update-response-methods.md b/.changes/update-response-methods.md new file mode 100644 index 000000000..41bf5279c --- /dev/null +++ b/.changes/update-response-methods.md @@ -0,0 +1,5 @@ +--- +"tauri": patch +--- + +Added `UpdateResponse::body` and `UpdateResponse::date`. diff --git a/core/tauri/src/updater/mod.rs b/core/tauri/src/updater/mod.rs index 3c9a1f6f8..e63e18341 100644 --- a/core/tauri/src/updater/mod.rs +++ b/core/tauri/src/updater/mod.rs @@ -637,6 +637,16 @@ impl UpdateResponse { &self.update.version } + /// The update date. + pub fn date(&self) -> &str { + &self.update.date + } + + /// The update description. + pub fn body(&self) -> Option<&String> { + self.update.body.as_ref() + } + /// Downloads and installs the update. pub async fn download_and_install(self) -> Result<()> { download_and_install(self.update).await