Skip to content

Commit

Permalink
clean up subscriptions a little more
Browse files Browse the repository at this point in the history
  • Loading branch information
insipx committed Oct 16, 2024
1 parent 7aeedd0 commit fe27ed1
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[target.wasm32-unknown-unknown]
runner = 'wasm-bindgen-test-runner'

[alias]
xtask = "run --package xtask --"
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions xmtp_cryptography/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ name = "xmtp_cryptography"
rust-version = "1.70"
version.workspace = true

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown", "aarch64-apple-darwin"]

[dependencies]
tracing.workspace = true
curve25519-dalek = "4"
Expand Down
3 changes: 3 additions & 0 deletions xmtp_id/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ edition = "2021"
name = "xmtp_id"
version.workspace = true

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown", "aarch64-apple-darwin"]

[dependencies]
url = { workspace = true, features = ["serde"] }
async-trait.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion xmtp_mls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ xmtp_id = { path = "../xmtp_id" }
xmtp_proto = { workspace = true, features = ["convert"] }

# Optional/Features
xmtp_api_http = { path = "../xmtp_api_http", optional = true }
toml = { version = "0.8.4", optional = true }
tracing-wasm = { version = "0.2", optional = true }
xmtp_api_http = { path = "../xmtp_api_http", optional = true }
reqwest = { version = "0.12.4", features = ["stream"], optional = true }
console_error_panic_hook = { version = "0.1", optional = true }

Expand Down
2 changes: 1 addition & 1 deletion xmtp_mls/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub async fn sleep(duration: core::time::Duration) {
tokio::time::sleep(duration).await
}

/// Turn the Result<T, E> into an `Option<T>`, logging the error with `tracing::error` and
/// Turn the `Result<T, E>` into an `Option<T>`, logging the error with `tracing::error` and
/// returning `None` if the value matches on Result::Err().
/// Optionally pass a message as the second argument.
#[macro_export]
Expand Down
8 changes: 1 addition & 7 deletions xmtp_mls/src/subscriptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,7 @@ where
let metadata =
crate::optify!(group.metadata(provider), "error processing group metadata");
metadata
.filter(|m| {
if &Some(m.conversation_type) == conversation_type {
true
} else {
conversation_type.is_none()
}
})
.filter(|m| conversation_type.map_or(true, |ct| ct == m.conversation_type))
.map(|_| group)
};

Expand Down
4 changes: 3 additions & 1 deletion xmtp_v2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ version.workspace = true
aes-gcm = "0.10.1"
ecdsa = "0.15.1"
generic-array = "0.14.6"
# getrandom = { workspace = true, features = ["js"] }
hex = { workspace = true }
hkdf = "0.12.3"
k256 = { version = "0.12.0", features = ["ecdh"] }
rand = { workspace = true }
sha2 = "0.10.6"
sha3 = "0.10.6"

[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { workspace = true, features = ["js"] }

[dev-dependencies]

0 comments on commit fe27ed1

Please sign in to comment.