refactor: Unify naming of direct/single/1:1/normal chats (#8442)

Unifies internal naming of single/direct/1:1/normal chats
to match the naming used in the API.

Closes: #8368
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>

---------

Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
This commit is contained in:
Jagoda Estera Ślązak
2026-07-27 16:31:09 +02:00
committed by GitHub
parent df4197df56
commit afb1d0dba8
36 changed files with 212 additions and 222 deletions

View File

@@ -397,7 +397,7 @@ class Account:
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 single chat with Account, Contact or e-mail address."""
return self.create_contact(obj).create_chat()
def create_group_chat(

View File

@@ -74,7 +74,7 @@ class Chat:
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 True if this chat is a single chat, False otherwise."""
return lib.dc_chat_get_type(self._dc_chat) == const.DC_CHAT_TYPE_SINGLE
def is_mailinglist(self) -> bool:
@@ -458,7 +458,7 @@ class Chat:
"""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 single 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.

View File

@@ -107,7 +107,7 @@ class Contact:
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 single chat object for the specified contact or contact id.
:param contact: chat_id (int) or contact object.
:returns: a :class:`deltachat.chat.Chat` object.

View File

@@ -283,7 +283,7 @@ class Message:
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 single chat with the sender of this message.
:returns: :class:`deltachat.chat.Chat` instance
"""