lookup_key_contacts_fallback_to_chat

Function lookup_key_contacts_fallback_to_chat 

Source
async fn lookup_key_contacts_fallback_to_chat(
    context: &Context,
    address_list: &[SingleInfo],
    fingerprints: &[Fingerprint],
    chat_id: Option<ChatId>,
) -> Result<Vec<Option<ContactId>>>
Expand description

Adds or looks up key-contacts by fingerprints or by email addresses in the given chat.

fingerprints may be empty. This is used as a fallback when email addresses are available, but not the fingerprints, e.g. when core 1.157.3 client sends the To and Chat-Group-Past-Members header but not the corresponding fingerprint list.

Lookup is restricted to the chat ID.

If contact cannot be found, None is returned. This ensures that the length of the result vector is the same as the number of addresses in the header and it is possible to find corresponding Chat-Group-Member-Timestamps items.