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:
parent
199b3ae7ae
commit
4266368a98
8 changed files with 177 additions and 39 deletions
|
|
@ -17,7 +17,7 @@ pub async fn bind<S: AsyncRead + AsyncWrite + Unpin>(
|
|||
if stream.stream_features.can_bind() {
|
||||
let resource = stream
|
||||
.jid
|
||||
.resource()
|
||||
.resource_str()
|
||||
.and_then(|resource| Some(resource.to_owned()));
|
||||
let iq = Iq::from_set(BIND_REQ_ID, BindQuery::new(resource));
|
||||
stream.send_stanza(iq).await?;
|
||||
|
|
|
|||
Loading…
Reference in a new issue