diff --git a/tokio-xmpp/src/starttls/mod.rs b/tokio-xmpp/src/starttls/mod.rs index bde220cd..f80438a9 100644 --- a/tokio-xmpp/src/starttls/mod.rs +++ b/tokio-xmpp/src/starttls/mod.rs @@ -114,7 +114,7 @@ impl ServerConnector for ServerConfig { async fn get_tls_stream( xmpp_stream: XMPPStream, ) -> Result, Error> { - let domain = xmpp_stream.jid.domain_str().to_owned(); + let domain = xmpp_stream.jid.domain().to_owned(); let stream = xmpp_stream.into_inner(); let tls_stream = TlsConnector::from(NativeTlsConnector::builder().build().unwrap()) .connect(&domain, stream)