mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-26 01:03:37 +00:00
Fixed bug in actor_request().
This commit is contained in:
parent
a0bcc4e6c0
commit
6586be50a0
3 changed files with 15 additions and 2 deletions
|
@ -65,8 +65,7 @@ int actor_request(snac *snac, char *actor, d_char **data)
|
|||
|
||||
if (valid_status(status2)) {
|
||||
/* renew data */
|
||||
xs *j = xs_json_dumps_pp(payload, 4);
|
||||
status = actor_add(snac, actor, j);
|
||||
status = actor_add(snac, actor, payload);
|
||||
|
||||
*data = payload;
|
||||
payload = NULL;
|
||||
|
|
13
main.c
13
main.c
|
@ -91,6 +91,19 @@ int main(int argc, char *argv[])
|
|||
xs *j = xs_json_dumps_pp(data, 4);
|
||||
printf("%s\n", j);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strcmp(cmd, "actor") == 0) {
|
||||
int status;
|
||||
xs *data = NULL;
|
||||
|
||||
status = actor_request(&snac, url, &data);
|
||||
|
||||
printf("status: %d\n", status);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
1
snac.h
1
snac.h
|
@ -81,3 +81,4 @@ int webfinger_get_handler(d_char *req, char *q_path,
|
|||
char **body, int *b_size, char **ctype);
|
||||
|
||||
int activitypub_request(snac *snac, char *url, d_char **data);
|
||||
int actor_request(snac *snac, char *actor, d_char **data);
|
||||
|
|
Loading…
Reference in a new issue