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

@@ -968,9 +968,7 @@ impl CommandApi {
/// This may be useful if you want to show some help for just created groups.
async fn create_group_chat(&self, account_id: u32, name: String) -> Result<u32> {
let ctx = self.get_context(account_id).await?;
chat::create_group_chat(&ctx, &name)
.await
.map(|id| id.to_u32())
chat::create_group(&ctx, &name).await.map(|id| id.to_u32())
}
/// Create a new unencrypted group chat.
@@ -979,7 +977,7 @@ impl CommandApi {
/// address-contacts.
async fn create_group_chat_unencrypted(&self, account_id: u32, name: String) -> Result<u32> {
let ctx = self.get_context(account_id).await?;
chat::create_group_chat_unencrypted(&ctx, &name)
chat::create_group_unencrypted(&ctx, &name)
.await
.map(|id| id.to_u32())
}