Skip to content

Commit

Permalink
fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mchenani committed Dec 13, 2024
1 parent 7ef4f3c commit d288c6b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
11 changes: 5 additions & 6 deletions bindings_node/src/conversation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,9 @@ impl Conversation {
self.created_at_ns,
);
let provider = group.mls_provider().map_err(ErrorWrapper::from)?;
let conversation_type = tokio::task::block_in_place(|| {
futures::executor::block_on(group.conversation_type(&provider))
})
.map_err(ErrorWrapper::from)?;
let conversation_type = group
.conversation_type(&provider)
.map_err(ErrorWrapper::from)?;
let kind = match conversation_type {
ConversationType::Group => None,
ConversationType::Dm => Some(XmtpGroupMessageKind::Application),
Expand Down Expand Up @@ -611,8 +610,8 @@ impl Conversation {
);

let metadata = group
.metadata(&group.mls_provider().map_err(ErrorWrapper::from)?)
.map_err(ErrorWrapper::from)?;
.metadata(&group.mls_provider().map_err(ErrorWrapper::from)?)
.map_err(ErrorWrapper::from)?;

Ok(GroupMetadata { inner: metadata })
}
Expand Down
1 change: 0 additions & 1 deletion bindings_wasm/src/conversation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ impl Conversation {
.map_err(|e| JsError::new(&format!("{e}")))?;
let conversation_type = group
.conversation_type(&provider)
.await
.map_err(|e| JsError::new(&format!("{e}")))?;
let kind = match conversation_type {
ConversationType::Group => None,
Expand Down
5 changes: 1 addition & 4 deletions xmtp_mls/src/groups/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1183,10 +1183,7 @@ impl<ScopedClient: ScopedGroupClient> MlsGroup<ScopedClient> {
}

/// Get the `GroupMetadata` of the group.
pub fn metadata(
&self,
provider: &XmtpOpenMlsProvider,
) -> Result<GroupMetadata, GroupError> {
pub fn metadata(&self, provider: &XmtpOpenMlsProvider) -> Result<GroupMetadata, GroupError> {
self.load_mls_group_with_lock(provider, |mls_group| {
extract_group_metadata(&mls_group).map_err(Into::into)
})
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 @@ -106,10 +106,10 @@ pub trait Delete<Model> {
}

use crate::groups::GroupError;
use crate::groups::GroupError::LockUnavailable;
pub use stream_handles::{
spawn, AbortHandle, GenericStreamHandle, StreamHandle, StreamHandleError,
};
use crate::groups::GroupError::LockUnavailable;

#[cfg(test)]
pub(crate) mod tests {
Expand Down

0 comments on commit d288c6b

Please sign in to comment.