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

more descriptive function names

This commit is contained in:
B. Petersen 2018-04-01 20:25:36 +02:00
parent 2ef6067461
commit fa4b254886
4 changed files with 16 additions and 10 deletions

View file

@ -136,13 +136,19 @@ uint32_t mrmsg_get_id(const mrmsg_t* msg)
/**
* Get the ID of contact who wrote the message.
* To get details about the contact, pass the returned ID to mrmailbox_get_contact().
*
* If the ID is equal to MR_CONTACT_ID_SELF (1), the message is an outgoing
* message that is typically shown on the right side of the chat view.
*
* Otherwise, the message is an incoming message; to get details about the sender,
* pass the returned ID to mrmailbox_get_contact().
*
* @memberof mrmsg_t
*
* @param msg The message object.
*
* @return the ID of the contact who wrote the message, MR_CONTACT_ID_SELF (1) if this is an outgoing message, 0 on errors.
* @return the ID of the contact who wrote the message, MR_CONTACT_ID_SELF (1)
* if this is an outgoing message, 0 on errors.
*/
uint32_t mrmsg_get_from_id(const mrmsg_t* msg)
{
@ -744,12 +750,12 @@ int mrmsg_is_forwarded(const mrmsg_t* msg)
/**
* Check if the message is a system command.
*
* System command messages are messages not "typed" by the user but
* Check if the message is an informational message, created by the
* device or by another users. Suche messages are not "typed" by the user but
* created due to other actions, eg. mrmailbox_set_chat_name(), mrmailbox_set_chat_profile_image()
* or mrmailbox_add_contact_to_chat().
*
* These messages are typically shown i n the center of the chat view,
* mrmsg_get_text() returns a descriptive text about what is going on.
*
* There is no need to perfrom any action when seeing such a message - this is already done by the core.
@ -761,7 +767,7 @@ int mrmsg_is_forwarded(const mrmsg_t* msg)
*
* @return 1=message is a system command, 0=normal message
*/
int mrmsg_is_systemcmd(const mrmsg_t* msg)
int mrmsg_is_info(const mrmsg_t* msg)
{
if( msg == NULL || msg->m_magic != MR_MSG_MAGIC ) {
return 0;