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

add functions to replace the former direct structure access

This commit is contained in:
B. Petersen 2018-01-03 21:34:19 +01:00
parent adb7ea8b29
commit 352ddc1121
8 changed files with 86 additions and 7 deletions

View file

@ -150,6 +150,25 @@ uint32_t mrmsg_get_from_id(mrmsg_t* msg)
}
/**
* Get the ID of chat the message belongs to.
* To get details about the chat, pass the returned ID to mrmailbox_get_chat().
*
* @memberof mrmsg_t
*
* @param msg The message object.
*
* @return the ID of the chat the message belongs to, 0 on errors.
*/
uint32_t mrmsg_get_chat_id(mrmsg_t* msg)
{
if( msg == NULL || msg->m_magic != MR_MSG_MAGIC ) {
return 0;
}
return msg->m_chat_id;
}
/**
* Get the type of the message.
*