Add API to get next fresh message

Rust: Context.get_next_fresh_msg()
C: dc_get_next_fresh_msg()
JSON-RPC: get_next_fresh_msg method
This commit is contained in:
link2xt
2022-11-27 11:37:24 +00:00
parent 08de326930
commit f02888e3cc
5 changed files with 58 additions and 2 deletions

View File

@@ -1278,6 +1278,16 @@ int dc_estimate_deletion_cnt (dc_context_t* context, int from_ser
dc_array_t* dc_get_fresh_msgs (dc_context_t* context);
/**
* Returns the ID of the fresh message of any chat.
*
* @memberof dc_context_t
* @param context The context object as returned from dc_context_new().
* @return Message ID of the next fresh message. Returns 0 on error.
*/
dc_array_t* dc_get_next_fresh_msg (dc_context_t* context);
/**
* Mark all messages in a chat as _noticed_.
* _Noticed_ messages are no longer _fresh_ and do not count as being unseen