Function deltachat::decrypt::get_autocrypt_peerstate

source ·
pub(crate) async fn get_autocrypt_peerstate(
    context: &Context,
    from: &str,
    autocrypt_header: Option<&Aheader>,
    message_time: i64,
    allow_aeap: bool
) -> Result<Option<Peerstate>>
Expand description

Applies Autocrypt header to Autocrypt peer state and saves it into the database.

If we already know this fingerprint from another contact’s peerstate, return that peerstate in order to make AEAP work, but don’t save it into the db yet.

Returns updated peerstate.