mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-07-17 13:29:32 +00:00
Update demls for external group configuration (#156)
This commit is contained in:
parent
d2cb3017e9
commit
098612ba8b
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1816,7 +1816,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "de-mls"
|
name = "de-mls"
|
||||||
version = "4.0.0"
|
version = "4.0.0"
|
||||||
source = "git+https://github.com/vacp2p/de-mls?branch=main#3056898d07519bc6d8fbf58ce5cb4e004e4cc932"
|
source = "git+https://github.com/vacp2p/de-mls?branch=main#09533ce21021beea9903993a8f41f570e5b46b13"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hashgraph-like-consensus",
|
"hashgraph-like-consensus",
|
||||||
"indexmap 2.14.0",
|
"indexmap 2.14.0",
|
||||||
|
|||||||
@ -16,14 +16,13 @@ use de_mls::{
|
|||||||
defaults::{DefaultConsensusPlugin, DefaultPeerScoring, InMemoryPeerScoreStorage},
|
defaults::{DefaultConsensusPlugin, DefaultPeerScoring, InMemoryPeerScoreStorage},
|
||||||
};
|
};
|
||||||
use hashgraph_like_consensus::signing::EthereumConsensusSigner;
|
use hashgraph_like_consensus::signing::EthereumConsensusSigner;
|
||||||
|
use openmls::group::MlsGroupCreateConfig;
|
||||||
use prost::Message;
|
use prost::Message;
|
||||||
use shared_traits::{IdentId, IdentIdRef};
|
use shared_traits::{IdentId, IdentIdRef};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use tracing::{info, instrument, warn};
|
use tracing::{info, instrument, warn};
|
||||||
|
|
||||||
use crate::inbox_v2::CIPHER_SUITE;
|
|
||||||
|
|
||||||
use crate::IdentityProvider;
|
use crate::IdentityProvider;
|
||||||
use crate::conversation::{ConversationIdRef, ExternalServices, ServiceContext};
|
use crate::conversation::{ConversationIdRef, ExternalServices, ServiceContext};
|
||||||
use crate::{
|
use crate::{
|
||||||
@ -92,6 +91,12 @@ fn rand_string(n: usize) -> String {
|
|||||||
hex::encode(bytes)
|
hex::encode(bytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn group_config() -> MlsGroupCreateConfig {
|
||||||
|
MlsGroupCreateConfig::builder()
|
||||||
|
.use_ratchet_tree_extension(true)
|
||||||
|
.build()
|
||||||
|
}
|
||||||
|
|
||||||
impl GroupV2Convo {
|
impl GroupV2Convo {
|
||||||
pub fn new<S: ExternalServices>(
|
pub fn new<S: ExternalServices>(
|
||||||
service_ctx: &mut ServiceContext<S>,
|
service_ctx: &mut ServiceContext<S>,
|
||||||
@ -102,7 +107,7 @@ impl GroupV2Convo {
|
|||||||
&member_id(service_ctx),
|
&member_id(service_ctx),
|
||||||
&service_ctx.mls_provider,
|
&service_ctx.mls_provider,
|
||||||
service_ctx.mls_identity.get_credential(),
|
service_ctx.mls_identity.get_credential(),
|
||||||
CIPHER_SUITE,
|
&group_config(),
|
||||||
&service_ctx.mls_identity,
|
&service_ctx.mls_identity,
|
||||||
&make_consensus(),
|
&make_consensus(),
|
||||||
make_scoring(),
|
make_scoring(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user