implement channel acking and new messages

This commit is contained in:
2019-07-12 18:30:44 +02:00
parent b8fa202ce3
commit ab65d49605
10 changed files with 139 additions and 11 deletions

View File

@@ -96,6 +96,13 @@ bool dc_api_get_messages(dc_api_t api, dc_account_t login, dc_channel_t c);
bool dc_api_post_message(dc_api_t api, dc_account_t login,
dc_channel_t c, dc_message_t m);
/**
* "ack" a channel, meaning that you have read it its contents. You must provide
* a message, so that discord knows which message was the last you read.
*/
bool dc_api_channel_ack(dc_api_t api, dc_account_t login,
dc_channel_t c, dc_message_t msg);
/**
* Fetch a list of friends of the login account "login". The friends are stored
* within the login object.

View File

@@ -67,4 +67,7 @@ void dc_channel_add_messages(dc_channel_t c, dc_message_t *m, size_t s);
bool dc_channel_compare(dc_channel_t a, dc_channel_t b);
bool dc_channel_has_new_messages(dc_channel_t c);
void dc_channel_mark_read(dc_channel_t c);
#endif