1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-06 03:50:08 +02:00

add continue-key-transfer api

This commit is contained in:
B. Petersen 2017-12-04 17:42:30 +01:00
parent 91531188f0
commit 9647d3b380
6 changed files with 74 additions and 8 deletions

View file

@ -653,6 +653,29 @@ int mrmsg_is_systemcmd(mrmsg_t* msg)
}
/**
* Check if the message is an Autocrypt Setup Message.
*
* Setup messages should be shown in an unique way eg. using a different text color.
* On a click or another action, the user should be prompted for the setup code
* which is forwarded to mrmailbox_continue_key_transfer() then.
*
* Setup message are typically generated by mrmailbox_initiate_key_transfer() on another device.
*
* @memberof mrmsg_t
*
* @param msg The message object.
*
* @return 1=message is a setup message, 0=no setup message.
* For setup messages, mrmsg_is_systemcmd() returns 1 and
* mrmsg_get_type() returns MR_MSG_FILE.
*/
int mrmsg_is_setupmessage(mrmsg_t* msg)
{
return mrparam_get_int(msg->m_param, MRP_SYSTEM_CMD, 0)==MR_SYSTEM_AUTOCRYPT_SETUP_MESSAGE? 1 : 0;
}
/*******************************************************************************
* Misc.
******************************************************************************/