refactor: Rename chat::create_group_chat() to create_group()

If we use modules (which are actually namespaces), we can use shorter names. Another approach is to
only use modules for internal code incapsulation and use full names like deltachat-ffi does.
This commit is contained in:
iequidoo
2025-09-14 00:27:05 -03:00
committed by iequidoo
parent 04c2585c27
commit fc81cef113
19 changed files with 162 additions and 166 deletions

View File

@@ -6,7 +6,7 @@ use std::time::Duration;
use super::*;
use crate::chat::{
self, ChatId, add_contact_to_chat, create_group_chat, remove_contact_from_chat, send_text_msg,
self, ChatId, add_contact_to_chat, create_group, remove_contact_from_chat, send_text_msg,
};
use crate::chatlist::Chatlist;
use crate::constants;
@@ -351,7 +351,7 @@ async fn test_subject_in_group() -> Result<()> {
let mut tcm = TestContextManager::new();
let t = tcm.alice().await;
let bob = tcm.bob().await;
let group_id = chat::create_group_chat(&t, "groupname").await.unwrap();
let group_id = chat::create_group(&t, "groupname").await.unwrap();
let bob_contact_id = t.add_or_lookup_contact_id(&bob).await;
chat::add_contact_to_chat(&t, group_id, bob_contact_id).await?;
@@ -753,7 +753,7 @@ async fn test_remove_member_bcc() -> Result<()> {
let charlie_contact = Contact::get_by_id(alice, charlie_id).await?;
let charlie_addr = charlie_contact.get_addr();
let alice_chat_id = create_group_chat(alice, "foo").await?;
let alice_chat_id = create_group(alice, "foo").await?;
add_contact_to_chat(alice, alice_chat_id, bob_id).await?;
add_contact_to_chat(alice, alice_chat_id, charlie_id).await?;
send_text_msg(alice, alice_chat_id, "Creating a group".to_string()).await?;