mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-06 03:50:08 +02:00
For messages in the deaddrop, return the chat_id MR_CHAT_ID_DEADDROP (internally, the real chat id is different, however)
This commit is contained in:
parent
7d88c51d8e
commit
27fc3de4c0
1 changed files with 3 additions and 1 deletions
|
@ -154,6 +154,8 @@ 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().
|
||||
* If a message is still in the deaddrop, the ID MR_CHAT_ID_DEADDROP is returned
|
||||
* although internally another ID is used.
|
||||
*
|
||||
* @memberof mrmsg_t
|
||||
*
|
||||
|
@ -166,7 +168,7 @@ 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;
|
||||
return msg->m_chat_blocked? MR_CHAT_ID_DEADDROP : msg->m_chat_id;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue