mirror of
https://github.com/chatmail/core.git
synced 2026-09-22 13:01:21 +03:00
api!: remove addr field from Account objects in JSON-RPC APIs
`list_transports()` should be used instead. Previously `addr` field might have even not correspond to any transport as it was `Config::Addr` and not `Config::ConfiguredAddr`. BREAKING CHANGE: list_transports() should be used instead.
This commit is contained in:
@@ -13,7 +13,6 @@ pub enum Account {
|
||||
Configured {
|
||||
id: u32,
|
||||
display_name: Option<String>,
|
||||
addr: Option<String>,
|
||||
// size: u32,
|
||||
profile_image: Option<String>,
|
||||
color: String,
|
||||
@@ -29,7 +28,6 @@ impl Account {
|
||||
pub async fn from_context(ctx: &deltachat::context::Context, id: u32) -> Result<Self> {
|
||||
if ctx.is_configured().await? {
|
||||
let display_name = ctx.get_config(Config::Displayname).await?;
|
||||
let addr = ctx.get_config(Config::Addr).await?;
|
||||
let profile_image = ctx.get_config(Config::Selfavatar).await?;
|
||||
let color = color_int_to_hex_string(
|
||||
Contact::get_by_id(ctx, ContactId::SELF)
|
||||
@@ -41,7 +39,6 @@ impl Account {
|
||||
Ok(Account::Configured {
|
||||
id,
|
||||
display_name,
|
||||
addr,
|
||||
profile_image,
|
||||
color,
|
||||
private_tag,
|
||||
|
||||
Reference in New Issue
Block a user