diff --git a/deltachat-ffi/deltachat.h b/deltachat-ffi/deltachat.h index d7f215abf..c4c20ee23 100644 --- a/deltachat-ffi/deltachat.h +++ b/deltachat-ffi/deltachat.h @@ -2602,6 +2602,25 @@ dc_lot_t* dc_chatlist_get_summary (const dc_chatlist_t* chatlist, siz dc_context_t* dc_chatlist_get_context (dc_chatlist_t* chatlist); +/** + * Get info summary for a chat, in json format. + * + * The returned json string has the following key/values: + * + * id: chat id + * name: chat/group name + * color: color of this chat + * last-message-from: who sent the last message + * last-message-text: message (truncated) + * last-message-state: DC_STATE* constant + * last-message-date: + * avatar-path: path-to-blobfile + * is_verified: yes/no + + * @return a utf8-encoded json string containing all requested info. Must be freed using dc_lot_unref(). NULL is never returned. + */ +char* dc_chat_get_info_json(dc_context_t* context, size_t chat_id) + /** * @class dc_chat_t *