From 9812d5ba75482da29ad0b13293ad46120a661dec Mon Sep 17 00:00:00 2001 From: Simon Laux Date: Thu, 24 Oct 2024 18:00:27 +0200 Subject: [PATCH] feat: jsonrpc: add `private_tag` to `Account::Configured` Object (#6107) Co-authored-by: iequidoo <117991069+iequidoo@users.noreply.github.com> --- deltachat-jsonrpc/src/api/types/account.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deltachat-jsonrpc/src/api/types/account.rs b/deltachat-jsonrpc/src/api/types/account.rs index b2909109d..a5f14240c 100644 --- a/deltachat-jsonrpc/src/api/types/account.rs +++ b/deltachat-jsonrpc/src/api/types/account.rs @@ -17,6 +17,9 @@ pub enum Account { // size: u32, profile_image: Option, // TODO: This needs to be converted to work with blob http server. color: String, + /// Optional tag as "Work", "Family". + /// Meant to help profile owner to differ between profiles with similar names. + private_tag: Option, }, #[serde(rename_all = "camelCase")] Unconfigured { id: u32 }, @@ -31,12 +34,14 @@ impl Account { let color = color_int_to_hex_string( Contact::get_by_id(ctx, ContactId::SELF).await?.get_color(), ); + let private_tag = ctx.get_config(Config::PrivateTag).await?; Ok(Account::Configured { id, display_name, addr, profile_image, color, + private_tag, }) } else { Ok(Account::Unconfigured { id })