Module chat Copy item path Source Expand description Chat An object representing a single chat in memory.
Chat objects are created using eg. Chat::load_from_db
and are not updated on database changes;
if you want an update, you have to recreate the object. ChatId Chat ID, including reserved IDs. ChatIdBlocked π Handle a ChatId
and its Blocked
status at once. ChatInfo The current state of a chat. ChatVisibilityIter An iterator over the variants of ChatVisibility MessageListOptions Chat message list request options. CantSendReason π The reason why messages cannot be sent to the chat. ChatItem An chat item, such as a message or a marker. ChatVisibility Whether the chat is pinned or archived. MuteDuration Chat mute duration. ProtectionStatus Chat protection status. SyncAction π An action synchronised to other devices. SyncId π A cross-device chat id used for synchronisation. add_contact_to_chat Adds a contact to the chat.
If the group is promoted, also sends out a system message to all group members add_contact_to_chat_ex π add_device_msg Adds a message to device chat. add_device_msg_with_importance Adds a message to device chat. add_info_msg π Adds info message with a given text and timestamp
to the chat. add_info_msg_with_cmd π Adds an informational message to chat. add_to_chat_contacts_table π Adds contacts to the chats_contacts
table. create_broadcast_list Creates a new broadcast list. create_broadcast_list_ex π create_group_chat Creates a group chat with a given name
. create_send_msg_jobs π Constructs jobs for sending a message and inserts them into the appropriate table. delete_and_reset_all_device_msgs π find_unused_broadcast_list_name π Finds an unused name for a new broadcast list. forward_msgs Forwards multiple messages to a chat. get_archive_icon π get_broadcast_icon π get_chat_cnt π get_chat_contacts Returns a vector of contact IDs for given chat ID. get_chat_id_by_grpid π Returns a tuple of (chatid, is_protected, blocked)
. get_chat_media Returns all database message IDs of the given types. get_chat_msgs Returns all messages belonging to the chat. get_chat_msgs_ex Returns messages belonging to the chat according to the given options. get_past_chat_contacts Returns a vector of contact IDs for given chat ID that are no longer part of the group. is_contact_in_chat Returns whether a contact is in a chat or not. is_group_explicitly_left π mark_old_messages_as_noticed π Marks messages preceding outgoing messages as noticed. marknoticed_chat Marks all messages in the chat as noticed.
If the given chat-id is the archive-link, marks all messages in all archived chats as noticed. prepare_msg_blob π prepare_send_msg π Prepares a message to be sent out. remove_contact_from_chat Removes contact from the chat. remove_from_chat_contacts_table π Removes a contact from the chat
by updating the remove_timestamp
. rename_ex π resend_msgs Resends given messages with the same Message-ID. resume_securejoin_wait π Checks if there is a 1:1 chat in-progress SecureJoin for Bob and, if necessary, schedules a task
unblocking the chat and notifying the user accordingly. save_copy_in_self_talk π Saves a copy of the given message in βSaved Messagesβ using the given RFC724 id.
To allow UIs to have a βshow in contextβ button,
the copy contains a reference to the original message
as well as to the original chat in case the original message gets deleted.
Returns data needed to add a SaveMessage
sync item. save_msgs Save a copy of the message in βSaved Messagesβ
and send a sync messages so that other devices save the message as well, unless deleted there. save_text_edit_to_db π send_edit_request Sends chat members a request to edit the given messageβs text. send_msg Sends a message object to a chat. send_msg_sync Tries to send a message synchronously. send_text_msg Sends a text message to the given chat. send_videochat_invitation Sends invitation to a videochat. set_chat_name Sets group or mailing list chat name. set_chat_profile_image Sets a new profile image for the chat. set_contacts_by_addrs π Set chat contacts by their addresses creating the corresponding contacts if necessary. set_group_explicitly_left π set_muted Mutes the chat for a given duration or unmutes it. set_muted_ex π shall_attach_selfavatar π Returns true if an avatar should be attached in the given chat. sync π update_chat_contacts_table π Set chat contacts in the chats_contacts
table. update_device_icon π update_msg_text_and_timestamp π update_saved_messages_icon π update_special_chat_name π update_special_chat_names π was_device_msg_ever_added Returns true if device message with a given label was ever added to the device chat.