aboutsummaryrefslogtreecommitdiffstats
path: root/lampada
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lampada/Cargo.toml18
-rw-r--r--lampada/src/lib.rs5
2 files changed, 12 insertions, 11 deletions
diff --git a/lampada/Cargo.toml b/lampada/Cargo.toml
index 421360c..1937162 100644
--- a/lampada/Cargo.toml
+++ b/lampada/Cargo.toml
@@ -7,20 +7,20 @@ edition = "2021"
serde = ["dep:serde"]
[dependencies]
-futures = "0.3.30"
-luz = { version = "0.1.0", path = "../luz" }
-peanuts = { version = "0.1.0", git = "https://bunny.garden/peanuts" }
-jid = { version = "0.1.0", path = "../jid" }
-stanza = { version = "0.1.0", path = "../stanza", features = ["xep_0203"] }
-tracing = "0.1.41"
-thiserror = "2.0.11"
-serde = { version = "1.0.219", features = ["derive"], optional = true }
+futures = { workspace = true }
+luz = { workspace = true }
+peanuts = { workspace = true }
+jid = { workspace = true }
+stanza = { workspace = true, features = ["xep_0203"] }
+tracing = { workspace = true }
+thiserror = { workspace = true }
+serde = { workspace = true, features = ["derive"], optional = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { workspace = true, features = ["macros", "sync"] }
[target.'cfg(target_arch = "wasm32")'.dependencies]
-tokio_with_wasm = { version = "0.8.2", features = [
+tokio_with_wasm = { workspace = true, features = [
"macros",
"rt",
"time",
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