diff --git a/src/imap.rs b/src/imap.rs index 4afaa5354..1c34e5d76 100644 --- a/src/imap.rs +++ b/src/imap.rs @@ -129,6 +129,8 @@ pub(crate) struct ServerMetadata { /// True if we think the relay supports push notifications. /// This gates wether we attempt to write an encrypted device token /// to per-transport IMAP metadata key `/private/devicetoken`. + /// + /// Any `/shared/vendor/deltachat/` entry identifies a chatmail relay. pub supports_push: bool, /// ICE servers for WebRTC calls. @@ -1384,6 +1386,8 @@ impl Session { _ => {} } } + let supports_push = + max_smtp_rcpt_to.is_some() || iroh_relay.is_some() || ice_servers.is_some(); let ice_servers = if let Some(ice_servers) = ice_servers { ice_servers } else { @@ -1399,7 +1403,7 @@ impl Session { admin, iroh_relay, max_smtp_rcpt_to, - supports_push: max_smtp_rcpt_to.is_some() || self.capabilities.has_xdeltapush, + supports_push, ice_servers, ice_servers_expiration_timestamp, app_versions, diff --git a/src/imap/capabilities.rs b/src/imap/capabilities.rs index 662de3d83..05bfa74e2 100644 --- a/src/imap/capabilities.rs +++ b/src/imap/capabilities.rs @@ -25,9 +25,6 @@ pub(crate) struct Capabilities { /// pub can_compress: bool, - /// True if the server advertises the legacy `XDELTAPUSH` capability. - pub has_xdeltapush: bool, - /// True if the server has an XCHATMAIL capability /// indicating that it is a server. /// diff --git a/src/imap/client.rs b/src/imap/client.rs index d9337941a..9f5d4de36 100644 --- a/src/imap/client.rs +++ b/src/imap/client.rs @@ -82,7 +82,6 @@ pub(crate) async fn identify_server( can_check_quota: caps.has_str("QUOTA"), can_metadata: caps.has_str("METADATA"), can_compress: caps.has_str("COMPRESS=DEFLATE"), - has_xdeltapush: caps.has_str("XDELTAPUSH"), is_chatmail: caps.has_str("XCHATMAIL"), server_id, };