Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ Create a chat with your friend and send a message:

```
> createchat 10
Single#Chat#12 created successfully.
Direct#Chat#12 created successfully.
> chat 12
Selecting chat Chat#12
Single#Chat#12: yourfriends@email.org [yourfriends@email.org] Icon: profile-db-blobs/4138c52e5bc1c576cda7dd44d088c07.png
Direct#Chat#12: yourfriends@email.org [yourfriends@email.org] Icon: profile-db-blobs/4138c52e5bc1c576cda7dd44d088c07.png
0 messages.
81.252µs to create this list, 123.625µs to mark all messages as noticed.
> send hi
Expand Down
40 changes: 20 additions & 20 deletions deltachat-ffi/deltachat.h
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ dc_chatlist_t* dc_get_chatlist (dc_context_t* context, int flags,
// handle chats

/**
* Create a normal chat with a single user. To create group chats,
* Create a direct chat with a single user. To create group chats,
* see dc_create_group_chat().
*
* If a chat already exists, this ID is returned, otherwise a new chat is created;
Expand All @@ -921,14 +921,14 @@ uint32_t dc_create_chat_by_contact_id (dc_context_t* context, uint32_t co


/**
* Check, if there is a normal chat with a given contact.
* Check, if there is a direct chat with a given contact.
* To get the chat messages, use dc_get_chat_msgs().
*
* @memberof dc_context_t
* @param context The context object as returned from dc_context_new().
* @param contact_id The contact ID to check.
* @return If there is a normal chat with the given contact_id, this chat_id is
* returned. If there is no normal chat with the contact_id, the function
* @return If there is a direct chat with the given contact_id, this chat_id is
* returned. If there is no direct chat with the contact_id, the function
* returns 0.
*/
uint32_t dc_get_chat_id_by_contact_id (dc_context_t* context, uint32_t contact_id);
Expand Down Expand Up @@ -1225,7 +1225,7 @@ uint32_t dc_init_webxdc_integration (dc_context_t* context, uint32_t c
* @memberof dc_context_t
* @param context The context object.
* @param chat_id The chat to place a call for.
* This needs to be a one-to-one chat.
* This needs to be a direct chat.
* @param place_call_info any data that other devices receive
* in #DC_EVENT_INCOMING_CALL.
* @param has_video Whether the call has video initially.
Expand Down Expand Up @@ -1631,7 +1631,7 @@ void dc_set_chat_visibility (dc_context_t* context, uint32_t ch
* - The chat or the contact is **not blocked**, so new messages from the user/the group may appear
* and the user may create the chat again.
* - **Groups are not left** - this would
* be unexpected as (1) deleting a normal chat also does not prevent new mails
* be unexpected as (1) deleting a direct chat also does not prevent new mails
* from arriving, (2) leaving a group requires sending a message to
* all group members - especially for groups not used for a longer time, this is
* really unexpected when deletion results in contacting all members again,
Expand All @@ -1649,7 +1649,7 @@ void dc_delete_chat (dc_context_t* context, uint32_t ch
/**
* Block a chat.
*
* Blocking 1:1 chats blocks the corresponding contact. Blocking
* Blocking direct chats blocks the corresponding contact. Blocking
* mailing lists creates a pseudo-contact in the list of blocked
* contacts, so blocked mailing lists can be discovered and unblocked
* the same way as the contacts. Blocking group chats deletes the
Expand Down Expand Up @@ -1678,7 +1678,7 @@ void dc_accept_chat (dc_context_t* context, uint32_t ch
/**
* Get the contact IDs belonging to a chat.
*
* - for normal chats, the function always returns exactly one contact,
* - for direct chats, the function always returns exactly one contact,
* DC_CONTACT_ID_SELF is returned only for SELF-chats.
*
* - for group chats all members are returned, DC_CONTACT_ID_SELF is returned
Expand Down Expand Up @@ -3700,7 +3700,7 @@ char* dc_chat_get_mailinglist_addr (const dc_chat_t* chat);


/**
* Get name of a chat. For one-to-one chats, this is the name of the contact.
* Get name of a chat. For direct chats, this is the name of the contact.
* For group chats, this is the name given e.g. to dc_create_group_chat() or
* received by a group-creation message.
*
Expand All @@ -3717,7 +3717,7 @@ char* dc_chat_get_name (const dc_chat_t* chat);
* Get the chat's profile image.
* For groups, this is the image set by any group member
* using dc_set_chat_profile_image().
* For normal chats, this is the image set by each remote user on their own
* For direct chats, this is the image set by each remote user on their own
* using dc_set_config(context, "selfavatar", image).
*
* @memberof dc_chat_t
Expand All @@ -3731,7 +3731,7 @@ char* dc_chat_get_profile_image (const dc_chat_t* chat);

/**
* Get a color for the chat.
* For 1:1 chats, the color is calculated from the contact's e-mail address.
* For direct chats, the color is calculated from the contact's e-mail address.
* Otherwise, the chat name is used.
* The color can be used for an fallback avatar with white initials
* as well as for headlines in bubbles of group chats.
Expand Down Expand Up @@ -3798,7 +3798,7 @@ int dc_chat_is_unpromoted (const dc_chat_t* chat);


/**
* Check if a chat is a self talk. Self talks are normal chats with
* Check if a chat is a self talk. Self talks are direct chats with
* the only contact DC_CONTACT_ID_SELF.
*
* @memberof dc_chat_t
Expand Down Expand Up @@ -3853,9 +3853,9 @@ int dc_chat_is_protected (const dc_chat_t* chat);
/**
* Check if the chat is encrypted.
*
* 1:1 chats with key-contacts and group chats with key-contacts
* Direct chats with key-contacts and group chats with key-contacts
* are encrypted.
* 1:1 chats with emails contacts and ad-hoc groups
* Direct chats with emails contacts and ad-hoc groups
* created for email threads are not encrypted.
*
* @memberof dc_chat_t
Expand Down Expand Up @@ -4389,7 +4389,7 @@ char* dc_msg_get_summarytext (const dc_msg_t* msg, int approx_c
* display name, or NULL.
*
* If this returns non-NULL, put a `~` before the override-sender-name and show the
* override-sender-name and the sender's avatar even in 1:1 chats.
* override-sender-name and the sender's avatar even in direct chats.
*
* In mailing lists, sender display name and sender address do not always belong together.
* In this case, this function gives you the name that should actually be shown over the message.
Expand Down Expand Up @@ -5635,13 +5635,13 @@ int64_t dc_lot_get_timestamp (const dc_lot_t* lot);
#define DC_CHAT_TYPE_UNDEFINED 0

/**
* A one-to-one chat with a single contact.
* A direct chat with a single contact.
*
* dc_get_chat_contacts() contains one record for the user.
* DC_CONTACT_ID_SELF is added _only_ for a self talk.
* These chats are created by dc_create_chat_by_contact_id().
*/
#define DC_CHAT_TYPE_SINGLE 100
#define DC_CHAT_TYPE_DIRECT 100

/**
* A group chat.
Expand Down Expand Up @@ -6745,7 +6745,7 @@ void dc_event_unref(dc_event_t* event);

/**
* Chats with normal visibility are not archived and are shown below all pinned chats.
* Archived chats, that receive new messages automatically become normal chats.
* Archived chats, that receive new messages automatically change their visibility to normal.
*/
#define DC_CHAT_VISIBILITY_NORMAL 0

Expand All @@ -6757,7 +6757,7 @@ void dc_event_unref(dc_event_t* event);
* The UI typically shows a little icon or chats beside archived chats in the chatlist,
* this is needed as e.g. the search will also return archived chats.
*
* If archived chats receive new messages, they become normal chats again.
* If such chat receives a new messages, their visibility changes to normal.
*
* To get a list of archived chats, use dc_get_chatlist() with the flag DC_GCL_ARCHIVED_ONLY.
*/
Expand Down Expand Up @@ -6955,7 +6955,7 @@ void dc_event_unref(dc_event_t* event);

/// "Message from %1$s"
///
/// Used in subjects of outgoing messages in one-to-one chats.
/// Used in subjects of outgoing messages in direct chats.
/// - %1$s will be replaced by the name of the sender,
/// this is the dc_set_config()-option `displayname` or `addr`
#define DC_STR_SUBJECT_FOR_NEW_CONTACT 73
Expand Down
4 changes: 2 additions & 2 deletions deltachat-jsonrpc/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ impl CommandApi {
/// - The chat or the contact is **not blocked**, so new messages from the user/the group may appear as a contact request
/// and the user may create the chat again.
/// - **Groups are not left** - this would
/// be unexpected as (1) deleting a normal chat also does not prevent new mails
/// be unexpected as (1) deleting a direct chat also does not prevent new mails
/// from arriving, (2) leaving a group requires sending a message to
/// all group members - especially for groups not used for a longer time, this is
/// really unexpected when deletion results in contacting all members again,
Expand Down Expand Up @@ -1040,7 +1040,7 @@ impl CommandApi {

/// Get the contact IDs belonging to a chat.
///
/// - for normal chats, the function always returns exactly one contact,
/// - for direct chats, the function always returns exactly one contact,
/// DC_CONTACT_ID_SELF is returned only for SELF-chats.
///
/// - for group chats all members are returned, DC_CONTACT_ID_SELF is returned
Expand Down
8 changes: 4 additions & 4 deletions deltachat-jsonrpc/src/api/types/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl FullChat {

let can_send = chat.can_send(context).await?;

let was_seen_recently = if chat.get_type() == Chattype::Single {
let was_seen_recently = if chat.get_type() == Chattype::Direct {
match contact_ids.first() {
Some(contact) => Contact::get_by_id(context, *contact)
.await
Expand Down Expand Up @@ -259,7 +259,7 @@ impl JsonrpcChatVisibility {
#[derive(Clone, Serialize, Deserialize, PartialEq, TypeDef, schemars::JsonSchema)]
#[serde(rename = "ChatType")]
pub enum JsonrpcChatType {
Single,
Direct,
Group,
Mailinglist,
OutBroadcast,
Expand All @@ -269,7 +269,7 @@ pub enum JsonrpcChatType {
impl From<Chattype> for JsonrpcChatType {
fn from(chattype: Chattype) -> Self {
match chattype {
Chattype::Single => JsonrpcChatType::Single,
Chattype::Direct => JsonrpcChattype::Direct,
Chattype::Group => JsonrpcChatType::Group,
Chattype::Mailinglist => JsonrpcChatType::Mailinglist,
Chattype::OutBroadcast => JsonrpcChatType::OutBroadcast,
Expand All @@ -281,7 +281,7 @@ impl From<Chattype> for JsonrpcChatType {
impl From<JsonrpcChatType> for Chattype {
fn from(chattype: JsonrpcChatType) -> Self {
match chattype {
JsonrpcChatType::Single => Chattype::Single,
JsonrpcChattype::Direct => Chattype::Direct,
JsonrpcChatType::Group => Chattype::Group,
JsonrpcChatType::Mailinglist => Chattype::Mailinglist,
JsonrpcChatType::OutBroadcast => Chattype::OutBroadcast,
Expand Down
2 changes: 1 addition & 1 deletion deltachat-jsonrpc/src/api/types/chat_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pub(crate) async fn get_chat_list_item_by_id(
None => (None, None),
};

let (dm_chat_contact, was_seen_recently) = if chat.get_type() == Chattype::Single {
let (dm_chat_contact, was_seen_recently) = if chat.get_type() == Chattype::Direct {
let chat_contacts = get_chat_contacts(ctx, chat_id).await?;
let contact = chat_contacts.first();
let was_seen_recently = match contact {
Expand Down
4 changes: 2 additions & 2 deletions deltachat-jsonrpc/src/api/types/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,11 @@ pub enum SystemMessageType {
LocationOnly,
InvalidUnencryptedMail,

/// 1:1 chats info message telling that SecureJoin has started and the user should wait for it
/// Direct chats info message telling that SecureJoin has started and the user should wait for it
/// to complete.
SecurejoinWait,

/// 1:1 chats info message telling that SecureJoin is still running, but the user may already
/// Direct chats info message telling that SecureJoin is still running, but the user may already
/// send messages.
SecurejoinWaitTimeout,

Expand Down
4 changes: 2 additions & 2 deletions deltachat-jsonrpc/typescript/scripts/generate-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ ${constants}
export const DC_CHAT_TYPE_MAILINGLIST = "Mailinglist";
/** @deprecated 10-8-2025 compare string directly with \`== "OutBroadcast"\` */
export const DC_CHAT_TYPE_OUT_BROADCAST = "OutBroadcast";
/** @deprecated 10-8-2025 compare string directly with \`== "Single"\` */
export const DC_CHAT_TYPE_SINGLE = "Single";
/** @deprecated 10-8-2025 compare string directly with \`== "Direct"\` */
export const DC_CHAT_TYPE_DIRECT = "Direct";
}\n`,
);
4 changes: 2 additions & 2 deletions deltachat-repl/src/cmdline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
let members = chat::get_chat_contacts(&context, sel_chat.id).await?;
let subtitle = if sel_chat.is_device_talk() {
"device-talk".to_string()
} else if sel_chat.get_type() == Chattype::Single && !members.is_empty() {
} else if sel_chat.get_type() == Chattype::Direct && !members.is_empty() {
let contact = Contact::get_by_id(&context, members[0]).await?;
contact.get_addr().to_string()
} else if sel_chat.get_type() == Chattype::Mailinglist && !members.is_empty() {
Expand Down Expand Up @@ -690,7 +690,7 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
let contact_id = ContactId::new(arg1.parse()?);
let chat_id = ChatId::create_for_contact(&context, contact_id).await?;

println!("Single#{chat_id} created successfully.",);
println!("Direct#{chat_id} created successfully.",);
}
"creategroup" => {
ensure!(!arg1.is_empty(), "Argument <name> missing.");
Expand Down
2 changes: 1 addition & 1 deletion deltachat-rpc-client/src/deltachat_rpc_client/contact.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def get_snapshot(self) -> AttrDict:
return snapshot

def create_chat(self) -> "Chat":
"""Create or get an existing 1:1 chat for this contact."""
"""Create or get an existing direct chat for this contact."""
from .chat import Chat

return Chat(
Expand Down
2 changes: 1 addition & 1 deletion python/src/deltachat/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def get_fresh_messages(self) -> Generator[Message, None, None]:
return (x for x in iter_array(dc_array, lambda x: Message.from_db(self, x)) if x is not None)

def create_chat(self, obj) -> Chat:
"""Create a 1:1 chat with Account, Contact or e-mail address."""
"""Create a direct chat with Account, Contact or e-mail address."""
return self.create_contact(obj).create_chat()

def create_group_chat(
Expand Down
8 changes: 4 additions & 4 deletions python/src/deltachat/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ def is_group(self) -> bool:
"""
return lib.dc_chat_get_type(self._dc_chat) == const.DC_CHAT_TYPE_GROUP

def is_single(self) -> bool:
"""Return True if this chat is a single/direct chat, False otherwise."""
return lib.dc_chat_get_type(self._dc_chat) == const.DC_CHAT_TYPE_SINGLE
def is_direct(self) -> bool:
"""Return True if this chat is a direct chat, False otherwise."""
return lib.dc_chat_get_type(self._dc_chat) == const.DC_CHAT_TYPE_DIRECT

def is_mailinglist(self) -> bool:
"""Return True if this chat is a mailing list, False otherwise."""
Expand Down Expand Up @@ -458,7 +458,7 @@ def get_profile_image(self):
"""Get group profile image.

For groups, this is the image set by any group member using
set_chat_profile_image(). For normal chats, this is the image
set_chat_profile_image(). For direct chats, this is the image
set by each remote user on their own using dc_set_config(context,
"selfavatar", image).
:returns: path to profile image, None if no profile image exists.
Expand Down
2 changes: 1 addition & 1 deletion python/src/deltachat/contact.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def status(self):
return from_dc_charpointer(lib.dc_contact_get_status(self._dc_contact))

def create_chat(self):
"""create or get an existing 1:1 chat object for the specified contact or contact id.
"""create or get an existing direct chat object for the specified contact or contact id.

:param contact: chat_id (int) or contact object.
:returns: a :class:`deltachat.chat.Chat` object.
Expand Down
2 changes: 1 addition & 1 deletion python/src/deltachat/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def set_override_sender_name(self, name):
lib.dc_msg_set_override_sender_name(self._dc_msg, as_dc_charpointer(name))

def get_sender_chat(self):
"""return the 1:1 chat with the sender of this message.
"""return the direct chat with the sender of this message.

:returns: :class:`deltachat.chat.Chat` instance
"""
Expand Down
4 changes: 2 additions & 2 deletions src/calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ impl Context {
) -> Result<MsgId> {
let chat = Chat::load_from_db(self, chat_id).await?;
ensure!(
chat.typ == Chattype::Single,
"Can only place calls in 1:1 chats"
chat.typ == Chattype::Direct,
"Can only place calls in direct chats"
);
ensure!(!chat.is_self_talk(), "Cannot call self");

Expand Down
Loading
Loading