Skip to content

Commit

Permalink
run cargo fmt to reformat it
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Apr 6, 2024
1 parent 0a0a5b2 commit 3aa3fb1
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions bindings_ffi/src/mls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ use xmtp_mls::{
client::Client as MlsClient,
groups::MlsGroup,
storage::{
group_message::StoredGroupMessage, EncryptedMessageStore, EncryptionKey, StorageOption, group_message::GroupMessageKind,
group_message::GroupMessageKind, group_message::StoredGroupMessage, EncryptedMessageStore,
EncryptionKey, StorageOption,
},
types::Address,
};
Expand Down Expand Up @@ -224,7 +225,10 @@ impl FfiConversations {
Ok(out)
}

pub fn process_streamed_welcome_message(&self, envelope_bytes: Vec<u8>) -> Result<Arc<FfiGroup>, GenericError> {
pub fn process_streamed_welcome_message(
&self,
envelope_bytes: Vec<u8>,
) -> Result<Arc<FfiGroup>, GenericError> {
let inner = self.inner_client.as_ref();
let group = inner.process_streamed_welcome_message(envelope_bytes)?;

Expand Down Expand Up @@ -365,23 +369,32 @@ impl FfiGroup {
);

let messages: Vec<FfiMessage> = group
.find_messages(None, opts.sent_before_ns, opts.sent_after_ns, None, opts.limit)?
.find_messages(
None,
opts.sent_before_ns,
opts.sent_after_ns,
None,
opts.limit,
)?
.into_iter()
.map(|msg| msg.into())
.collect();

Ok(messages)
}

pub async fn process_streamed_group_message(&self, envelope_bytes: Vec<u8>) -> Result<FfiMessage, GenericError> {
pub async fn process_streamed_group_message(
&self,
envelope_bytes: Vec<u8>,
) -> Result<FfiMessage, GenericError> {
let group = MlsGroup::new(
self.inner_client.as_ref(),
self.group_id.clone(),
self.created_at_ns,
);
let message = group.process_streamed_group_message(envelope_bytes).await?;
let ffi_message = message.into();

Ok(ffi_message)
}

Expand Down

0 comments on commit 3aa3fb1

Please sign in to comment.