From 97176b13f1ad29eec179b673764369e6ab43e9fd Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 27 Oct 2023 03:07:18 +0000 Subject: [PATCH] api(jsonrpc): add `id` to `ProviderInfo` --- deltachat-jsonrpc/src/api/types/provider_info.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deltachat-jsonrpc/src/api/types/provider_info.rs b/deltachat-jsonrpc/src/api/types/provider_info.rs index 43b868444..9142ffa60 100644 --- a/deltachat-jsonrpc/src/api/types/provider_info.rs +++ b/deltachat-jsonrpc/src/api/types/provider_info.rs @@ -6,6 +6,8 @@ use typescript_type_def::TypeDef; #[derive(Serialize, TypeDef, schemars::JsonSchema)] #[serde(rename_all = "camelCase")] pub struct ProviderInfo { + /// Unique ID, corresponding to provider database filename. + pub id: String, pub before_login_hint: String, pub overview_page: String, pub status: u32, // in reality this is an enum, but for simplicity and because it gets converted into a number anyway, we use an u32 here. @@ -14,6 +16,7 @@ pub struct ProviderInfo { impl ProviderInfo { pub fn from_dc_type(provider: Option<&Provider>) -> Option { provider.map(|p| ProviderInfo { + id: p.id.to_owned(), before_login_hint: p.before_login_hint.to_owned(), overview_page: p.overview_page.to_owned(), status: p.status.to_u32().unwrap(),