diff --git a/tokio-xmpp/src/starttls/mod.rs b/tokio-xmpp/src/starttls/mod.rs index bde220cda7692266105cacc19d171cdf0cff623b..f80438a9e6820a4e98691c32f93a3d7197426989 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)