mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-06-30 21:20:09 +00:00
cleanups
This commit is contained in:
parent
1a0ee68772
commit
4c0cc97cc3
@ -22,7 +22,6 @@ use de_mls::protos::de_mls::messages::v1::{
|
||||
use de_mls::session::{Conversation, ConversationConfig, ConversationDeps};
|
||||
use hashgraph_like_consensus::signing::EthereumConsensusSigner;
|
||||
use prost::Message;
|
||||
use rand;
|
||||
use shared_traits::{IdentId, IdentIdRef};
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
@ -457,7 +456,7 @@ impl GroupV2Convo {
|
||||
ConversationEvent::AppMessage(AppMessageProto {
|
||||
payload: Some(app_message::Payload::ConversationMessage(cm)),
|
||||
}) => Some(ConvoOutcome {
|
||||
convo_id: self.convo_id.clone().into(),
|
||||
convo_id: self.convo_id.clone(),
|
||||
content: Some(Content {
|
||||
bytes: cm.message.clone(),
|
||||
}),
|
||||
|
||||
@ -323,7 +323,7 @@ impl<'a, S: ExternalServices + 'static> Core<S> {
|
||||
|
||||
match convo_id {
|
||||
c if c == self.inbox.id() => self.dispatch_to_inbox(&env.payload).map(Into::into),
|
||||
c if c == self.pq_inbox.id() => self.dispatch_to_inbox2(&env.payload).map(Into::into),
|
||||
c if c == self.pq_inbox.id() => self.dispatch_to_inbox2(&env.payload),
|
||||
c if self.cached_convos.contains_key(&c) => {
|
||||
self.dispatch_to_convo(&c, &env.payload).map(Into::into)
|
||||
}
|
||||
@ -354,7 +354,7 @@ impl<'a, S: ExternalServices + 'static> Core<S> {
|
||||
|
||||
Ok(PayloadOutcome::Inbox(InboxOutcome {
|
||||
new_conversation: crate::NewConversation {
|
||||
convo_id: convo_id,
|
||||
convo_id,
|
||||
class: crate::ConversationClass::Group,
|
||||
},
|
||||
initial: None,
|
||||
|
||||
@ -11,6 +11,8 @@ use components::{EphemeralRegistry, LocalBroadcaster, MemStore};
|
||||
|
||||
use crate::wakeup::{TestWakeupProvider, TestWakeupService, WakeupRecord};
|
||||
|
||||
type OnMessageCallback = dyn Fn(&TestClient, PayloadOutcome);
|
||||
|
||||
type WS = TestWakeupService;
|
||||
type WP = TestWakeupProvider;
|
||||
|
||||
@ -130,7 +132,7 @@ pub struct TestHarness<const N: usize> {
|
||||
addresses: HashMap<usize, IdentId>,
|
||||
clients: Vec<TestClient>,
|
||||
wakeup_service: WS,
|
||||
cb: Box<dyn Fn(&TestClient, PayloadOutcome)>,
|
||||
cb: Box<OnMessageCallback>,
|
||||
// List of outcomes that were detected across all clients.
|
||||
pub observed_outcomes: Vec<Observation>,
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user