From 570bf94ef5a174cce4d93f9ed790697110883e02 Mon Sep 17 00:00:00 2001 From: nekobit Date: Wed, 6 Jul 2022 06:36:15 +0000 Subject: [PATCH] Get chat fixes FossilOrigin-Name: c643b8176ddd76daafe02a7660fbb1d85ebb8b2a02acf574b2362fb80cf0388d --- include/mastodont_chats.h | 2 +- src/chats.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/mastodont_chats.h b/include/mastodont_chats.h index 033867e..705fc0a 100644 --- a/include/mastodont_chats.h +++ b/include/mastodont_chats.h @@ -77,6 +77,6 @@ int mastodont_get_chat(mastodont_t* data, struct mstdnt_args* m_args, char* chat_id, struct mstdnt_storage* storage, - struct mstdnt_chat chat); + struct mstdnt_chat* chat); #endif // MASTODONT_CHATS_H diff --git a/src/chats.c b/src/chats.c index 4ada50a..901d3ca 100644 --- a/src/chats.c +++ b/src/chats.c @@ -177,7 +177,7 @@ int mastodont_get_chat(mastodont_t* data, struct mstdnt_args* m_args, char* chat_id, struct mstdnt_storage* storage, - struct mstdnt_chat chat) + struct mstdnt_chat* chat) { char url[MSTDNT_URLSIZE]; snprintf(url, MSTDNT_URLSIZE, "api/v1/pleroma/chats/%s", chat_id); @@ -186,12 +186,12 @@ int mastodont_get_chat(mastodont_t* data, .storage = storage, .url = url, .params_query = NULL, - .params_query_len = NULL, + .params_query_len = 0, .params_post = NULL, .params_post_len = 0, .request_type = CURLOPT_HTTPGET, .request_type_custom = NULL, - .args = NULL, + .args = chat, .callback = mstdnt_chat_json_callback, };