Expand description
Internet Message Format reception pipeline.
StructsΒ§
- Group
Changes πInfo - The return type of apply_group_changes. Contains information on which system messages should be shown in the chat.
- Received
Msg - This is the struct that is returned after receiving one email (aka MIME message).
EnumsΒ§
- Verified
Encryption π
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 inmime_parser.parts
produces a new row in themsgs
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.