aboutsummaryrefslogtreecommitdiffstats
path: root/lampada/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lampada/src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/lampada/src/lib.rs b/lampada/src/lib.rs
index 5b1f89f..6b6cbe8 100644
--- a/lampada/src/lib.rs
+++ b/lampada/src/lib.rs
@@ -262,6 +262,7 @@ where
let shutdown_recv = shutdown_recv.fuse();
self.connection_supervisor_shutdown = shutdown_recv;
+ let resource = jid.resourcepart.clone().expect("client somehow connected without binding");
let connected = Connected {
jid,
write_handle: writer,
@@ -272,7 +273,7 @@ where
self.connected = Some((connected, supervisor));
// REMEMBER TO NOTIFY IT@S GOOD
- sender.send(Ok(()));
+ sender.send(Ok(resource));
}
Err(e) => {
tracing::error!("error: {}", e);
@@ -320,7 +321,7 @@ where
pub enum CoreClientCommand<C> {
// TODO: login invisible xep-0186
/// connect to XMPP chat server. gets roster and publishes initial presence.
- Connect(oneshot::Sender<Result<(), ConnectionError>>),
+ Connect(oneshot::Sender<Result<String, ConnectionError>>),
/// disconnect from XMPP chat server, sending unavailable presence then closing stream.
Disconnect,
/// TODO: generics