Skip to content

Commit 9812d5b

Browse files
Simon-Lauxiequidoo
andauthored
feat: jsonrpc: add private_tag to Account::Configured Object (#6107)
Co-authored-by: iequidoo <[email protected]>
1 parent bc7568e commit 9812d5b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ pub enum Account {
1717
// size: u32,
1818
profile_image: Option<String>, // TODO: This needs to be converted to work with blob http server.
1919
color: String,
20+
/// Optional tag as "Work", "Family".
21+
/// Meant to help profile owner to differ between profiles with similar names.
22+
private_tag: Option<String>,
2023
},
2124
#[serde(rename_all = "camelCase")]
2225
Unconfigured { id: u32 },
@@ -31,12 +34,14 @@ impl Account {
3134
let color = color_int_to_hex_string(
3235
Contact::get_by_id(ctx, ContactId::SELF).await?.get_color(),
3336
);
37+
let private_tag = ctx.get_config(Config::PrivateTag).await?;
3438
Ok(Account::Configured {
3539
id,
3640
display_name,
3741
addr,
3842
profile_image,
3943
color,
44+
private_tag,
4045
})
4146
} else {
4247
Ok(Account::Unconfigured { id })

0 commit comments

Comments
 (0)