Function deltachat::token::lookup

source ·
pub async fn lookup(
    context: &Context,
    namespace: Namespace,
    chat: Option<ChatId>
) -> Result<Option<String>>
Expand description

Lookup most recently created token for a namespace/chat combination.

As there may be more than one valid token for a chat-id, (eg. when a qr code token is withdrawn, recreated and revived later), use lookup() for qr-code creation only; do not use lookup() to check for token validity.

To check if a given token is valid, use exists().