Module message

Source
Expand description

Β§Messages and their identifiers.

StructsΒ§

Message
An object representing a single message in memory. The message object is not updated. If you want an update, you have to recreate the object.
MsgId
Message ID, including reserved IDs.

EnumsΒ§

MessageState
State of the message. For incoming messages, stores the information on whether the message was read or not. For outgoing message, the message could be pending, already delivered or confirmed.
MessengerMessage πŸ”’
Viewtype
How a message is primarily displayed.

FunctionsΒ§

delete_msg_locally πŸ”’
Delete a single message from the database, including references in other tables. This may be called in batches; the final events are emitted in delete_msgs_locally_done() then.
delete_msgs
Delete messages on all devices and on IMAP.
delete_msgs_ex
Delete messages on all devices, on IMAP and optionally for all chat members. Deleted messages are moved to the trash chat and scheduling for deletion on IMAP. When deleting messages for others, all messages must be self-sent and in the same chat.
delete_msgs_locally_done πŸ”’
Do final events and jobs after batch deletion using calls to delete_msg_locally(). To avoid additional database queries, collecting data is up to the caller.
estimate_deletion_cnt
Estimates the number of messages that will be deleted by the options delete_device_after or delete_server_after.
get_by_rfc724_mids πŸ”’
Given a list of Message-IDs, returns the most relevant message found in the database.
get_mime_headers πŸ”’
Get the raw mime-headers of the given message. Raw headers are saved for large messages that need a β€œShow full message…” to see HTML part.
get_msg_read_receipts
Returns contacts that sent read receipts and the time of reading.
get_request_msg_cnt
Returns the number of messages in contact request chats.
get_unblocked_msg_cnt
The number of messages assigned to unblocked chats
get_vcard_summary πŸ”’
Returns the 1st part of summary text (i.e. before the dash if any) for a valid DeltaChat vCard.
guess_msgtype_from_path_suffix πŸ”’
guess_msgtype_from_suffix πŸ”’
markseen_msgs
Marks requested messages as seen.
normalize_text πŸ”’
Returns text for storing in the msgs.txt_normalized column (to make case-insensitive search possible for non-ASCII messages).
rfc724_mid_exists πŸ”’
See rfc724_mid_exists_ex().
rfc724_mid_exists_ex πŸ”’
Returns MsgId and β€œsent” timestamp of the most recent message with given rfc724_mid (Message-ID header) and bool expr result if such messages exists in the db.
set_msg_failed πŸ”’
update_msg_state πŸ”’