mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-07-10 01:49:31 +00:00
Update constructor calls
This commit is contained in:
parent
8997957639
commit
ccaa0806b4
@ -226,7 +226,7 @@ impl<'a, S: ExternalServices + 'static> Core<S> {
|
|||||||
&mut self,
|
&mut self,
|
||||||
participants: &[IdentIdRef],
|
participants: &[IdentIdRef],
|
||||||
) -> Result<ConversationId, ChatError> {
|
) -> Result<ConversationId, ChatError> {
|
||||||
self.create_group_convo_v2(participants)
|
self.create_group_convo_v2(participants, "UnamedGroup", "")
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn create_group_convo_v1(
|
pub fn create_group_convo_v1(
|
||||||
@ -255,11 +255,13 @@ impl<'a, S: ExternalServices + 'static> Core<S> {
|
|||||||
pub fn create_group_convo_v2(
|
pub fn create_group_convo_v2(
|
||||||
&mut self,
|
&mut self,
|
||||||
participants: &[IdentIdRef],
|
participants: &[IdentIdRef],
|
||||||
|
name: &str,
|
||||||
|
desc: &str,
|
||||||
) -> Result<ConversationId, ChatError> {
|
) -> Result<ConversationId, ChatError> {
|
||||||
// TODO: (P1) Ensure errors are handled properly. This is a high chance for
|
// TODO: (P1) Ensure errors are handled properly. This is a high chance for
|
||||||
// desynchronized state: MlsGroup persistence, conversation persistence, and
|
// desynchronized state: MlsGroup persistence, conversation persistence, and
|
||||||
// invite delivery all happen separately.
|
// invite delivery all happen separately.
|
||||||
let mut convo = GroupV2Convo::new(&mut self.services)?;
|
let mut convo = GroupV2Convo::new(&mut self.services, name, desc)?;
|
||||||
convo.add_member(&mut self.services, participants)?;
|
convo.add_member(&mut self.services, participants)?;
|
||||||
let convo_id = convo.id().to_string();
|
let convo_id = convo.id().to_string();
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ fn groupv2_2way_roundtrip() {
|
|||||||
let particpants = &[&harness.raya().addr()];
|
let particpants = &[&harness.raya().addr()];
|
||||||
let convo_id = harness
|
let convo_id = harness
|
||||||
.saro()
|
.saro()
|
||||||
.create_group_convo_v2(particpants)
|
.create_group_convo_v2(particpants, "", "")
|
||||||
.expect("saro create group");
|
.expect("saro create group");
|
||||||
|
|
||||||
// Carry the invite through (commit, WelcomeReady, routing to Raya's inbox,
|
// Carry the invite through (commit, WelcomeReady, routing to Raya's inbox,
|
||||||
@ -56,7 +56,7 @@ fn core_client() {
|
|||||||
let particpants = &[&harness.raya().addr()];
|
let particpants = &[&harness.raya().addr()];
|
||||||
let convo_id = harness
|
let convo_id = harness
|
||||||
.saro()
|
.saro()
|
||||||
.create_group_convo_v2(particpants)
|
.create_group_convo_v2(particpants, "", "")
|
||||||
.expect("Saro create");
|
.expect("Saro create");
|
||||||
|
|
||||||
// Carry the invite through (commit, WelcomeReady, routing to Raya's inbox,
|
// Carry the invite through (commit, WelcomeReady, routing to Raya's inbox,
|
||||||
@ -114,7 +114,7 @@ fn core_client_batch_add() {
|
|||||||
let particpants = &[&harness.raya().addr(), &harness.pax().addr()];
|
let particpants = &[&harness.raya().addr(), &harness.pax().addr()];
|
||||||
harness
|
harness
|
||||||
.saro()
|
.saro()
|
||||||
.create_group_convo_v2(particpants)
|
.create_group_convo_v2(particpants, "", "")
|
||||||
.expect("Saro create");
|
.expect("Saro create");
|
||||||
|
|
||||||
// Carry the invite through (commit, WelcomeReady, routing to Raya's inbox,
|
// Carry the invite through (commit, WelcomeReady, routing to Raya's inbox,
|
||||||
@ -144,7 +144,7 @@ fn core_client_four_members_two_epochs() {
|
|||||||
let particpants = &[&harness.raya().addr(), &harness.pax().addr()];
|
let particpants = &[&harness.raya().addr(), &harness.pax().addr()];
|
||||||
let convo_id = harness
|
let convo_id = harness
|
||||||
.saro()
|
.saro()
|
||||||
.create_group_convo_v2(particpants)
|
.create_group_convo_v2(particpants, "", "")
|
||||||
.expect("Saro create");
|
.expect("Saro create");
|
||||||
|
|
||||||
// Carry the invite through (commit, WelcomeReady, routing to Raya's inbox,
|
// Carry the invite through (commit, WelcomeReady, routing to Raya's inbox,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user