Skip to content

Commit 97176b1

Browse files
committed
api(jsonrpc): add id to ProviderInfo
1 parent 18bb7e5 commit 97176b1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

deltachat-jsonrpc/src/api/types/provider_info.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ use typescript_type_def::TypeDef;
66
#[derive(Serialize, TypeDef, schemars::JsonSchema)]
77
#[serde(rename_all = "camelCase")]
88
pub struct ProviderInfo {
9+
/// Unique ID, corresponding to provider database filename.
10+
pub id: String,
911
pub before_login_hint: String,
1012
pub overview_page: String,
1113
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 {
1416
impl ProviderInfo {
1517
pub fn from_dc_type(provider: Option<&Provider>) -> Option<Self> {
1618
provider.map(|p| ProviderInfo {
19+
id: p.id.to_owned(),
1720
before_login_hint: p.before_login_hint.to_owned(),
1821
overview_page: p.overview_page.to_owned(),
1922
status: p.status.to_u32().unwrap(),

0 commit comments

Comments
 (0)