Copy functions lol
FossilOrigin-Name: 97b2b740eab465e8d0f84dc6b8473728849ab08a2a7948fbffab53fbd1afb5a9
This commit is contained in:
parent
ce3955d22f
commit
4451f88ad5
2 changed files with 39 additions and 1 deletions
|
@ -126,7 +126,19 @@ int mastodont_get_status_context(mastodont_t* data,
|
|||
struct mstdnt_status* statuses_after[],
|
||||
size_t* size_before,
|
||||
size_t* size_after);
|
||||
|
||||
|
||||
int mastodont_status_favourited_by(mastodont_t* data,
|
||||
char* id,
|
||||
struct mstdnt_storage* storage,
|
||||
struct mstdnt_account* accounts[],
|
||||
size_t* accts);
|
||||
|
||||
int mastodont_status_reblogged_by(mastodont_t* data,
|
||||
char* id,
|
||||
struct mstdnt_storage* storage,
|
||||
struct mstdnt_account* accounts[],
|
||||
size_t* accts);
|
||||
|
||||
int mastodont_create_status(mastodont_t* data,
|
||||
struct mstdnt_args* args,
|
||||
struct mstdnt_storage* storage);
|
||||
|
|
26
src/status.c
26
src/status.c
|
@ -433,6 +433,32 @@ int mastodont_get_status_context(mastodont_t* data,
|
|||
return mastodont_request(data, &req_args);
|
||||
}
|
||||
|
||||
int mastodont_status_favourited_by(mastodont_t* data,
|
||||
char* id,
|
||||
struct mstdnt_storage* storage,
|
||||
struct mstdnt_account* accounts[],
|
||||
size_t* accts)
|
||||
{
|
||||
struct mstdnt_account_args args = {
|
||||
statuses_before,
|
||||
size_after,
|
||||
};
|
||||
char url[MSTDNT_URLSIZE];
|
||||
snprintf(url, MSTDNT_URLSIZE, "api/v1/statuses/%s/context", id);
|
||||
|
||||
struct mastodont_request_args req_args = {
|
||||
storage,
|
||||
url,
|
||||
NULL, 0,
|
||||
NULL, 0,
|
||||
CURLOPT_HTTPGET,
|
||||
&args,
|
||||
_mstdnt_status_context_from_result_callback,
|
||||
};
|
||||
|
||||
return mastodont_request(data, &req_args);
|
||||
}
|
||||
|
||||
void mstdnt_cleanup_status(struct mstdnt_status* status)
|
||||
{
|
||||
cleanup_attachments(status->media_attachments);
|
||||
|
|
Loading…
Reference in a new issue