JIDs now have typed and stringy methods for node/domain/resource access

Jid now has typed with_resource and stringy with_resource_str
Jid now has is_full, is_bare
This commit is contained in:
xmppftw xmppftw 2023-06-21 18:30:25 +02:00
commit 4266368a98
8 changed files with 177 additions and 39 deletions

View file

@ -16,7 +16,7 @@ pub async fn start<S: AsyncRead + AsyncWrite + Unpin>(
ns: String,
) -> Result<XMPPStream<S>, Error> {
let attrs = [
("to".to_owned(), jid.domain().to_owned()),
("to".to_owned(), jid.domain_str().to_owned()),
("version".to_owned(), "1.0".to_owned()),
("xmlns".to_owned(), ns.clone()),
("xmlns:stream".to_owned(), ns::STREAM.to_owned()),