Module receive_imf

Source
Expand description

Internet Message Format reception pipeline.

StructsΒ§

GroupChangesInfo πŸ”’
The return type of apply_group_changes. Contains information on which system messages should be shown in the chat.
ReceivedMsg
This is the struct that is returned after receiving one email (aka MIME message).

EnumsΒ§

VerifiedEncryption πŸ”’

StaticsΒ§

LIST_ID_REGEX πŸ”’

FunctionsΒ§

add_or_lookup_contacts_by_address_list πŸ”’
Looks up contact IDs from the database given the list of recipients.
add_parts πŸ”’
Creates a ReceivedMsg from given parts which might consist of multiple messages (if there are multiple attachments). Every entry in mime_parser.parts produces a new row in the msgs table.
apply_group_changes πŸ”’
Apply group member list, name, avatar and protection status changes from the MIME message.
apply_mailinglist_changes πŸ”’
Set ListId param on the contact and ListPost param the chat. Only called for incoming messages since outgoing messages never have a List-Post header, anyway.
compute_mailinglist_name πŸ”’
create_adhoc_group πŸ”’
Creates ad-hoc group and returns chat ID on success.
create_group πŸ”’
This function tries to extract the group-id from the message and create a new group chat with this ID. If there is no group-id and there are more than two members, a new ad hoc group is created.
create_or_lookup_mailinglist πŸ”’
Create or lookup a mailing list chat.
from_field_to_contact_id
Converts β€œFrom” field to contact id.
get_parent_message πŸ”’
Returns the last message referenced from References: header found in the database.
get_prefetch_parent_message πŸ”’
get_previous_message πŸ”’
Returns the last message referenced from References header if it is in the database.
group_changes_msgs πŸ”’
Returns a list of strings that should be shown as info messages, informing about group membership changes.
handle_edit_delete πŸ”’
Checks for β€œChat-Edit” and β€œChat-Delete” headers, and edits/deletes existing messages accordingly.
has_verified_encryption πŸ”’
Checks whether the message is allowed to appear in a protected chat.
insert_tombstone πŸ”’
Inserts a tombstone into msgs table to prevent downloading the same message in the future.
is_probably_private_reply πŸ”’
If this method returns true, the message shall be assigned to the 1:1 chat with the sender. If it returns false, it shall be assigned to the parent chat.
lookup_chat_by_reply πŸ”’
lookup_chat_or_create_adhoc_group πŸ”’
mailinglist_header_listid πŸ”’
mark_recipients_as_verified πŸ”’
receive_imf_inner πŸ”’
Receive a message and add it to the database.
save_locations πŸ”’
Saves attached locations to the database.
tweak_sort_timestamp πŸ”’
update_chats_contacts_timestamps πŸ”’
update_verified_keys πŸ”’
Moves secondary verified key to primary verified key if the message is signed with a secondary verified key. Removes secondary verified key if the message is signed with primary key.