Internet Message Format reception pipeline.
- This is the struct that is returned after receiving one email (aka MIME message).
- Add contacts to database on receiving messages.
- Looks up contact IDs from the database given the list of recipients.
- Creates a
ReceivedMsgfrom given parts which might consist of multiple messages (if there are multiple attachments). Every entry in
mime_parser.partsproduces a new row in the
- Apply group member list, name, avatar and protection status changes from the MIME message.
- 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.
- Creates ad-hoc group and returns chat ID on success.
- This function tries to extract the group-id from the message and returns the corresponding chat_id. If the chat does not exist, it is created. If there is no group-id and there are more than two members, a new ad hoc group is created.
- Create or lookup a mailing list chat.
- try extract a grpid from a message-id list header value
- Converts “From” field to contact id.
- Returns the last message referenced from References: header found in the database.
- Returns the last message referenced from
Referencesheader if it is in the database.
- Given a list of Message-IDs, returns the latest message found in the database.
- Checks whether the message is allowed to appear in a protected chat.
- Inserts a tombstone into
msgstable to prevent downloading the same message in the future.
- 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.
- Emulates reception of a message from the network.
- Receive a message and add it to the database.
- Saves attached locations to the database.
- 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.