diff options
| author | 2023-06-12 10:42:59 +0200 | |
|---|---|---|
| committer | 2023-06-12 10:42:59 +0200 | |
| commit | 564b5b1161adaab9170f52535e2dfa17edc2a18c (patch) | |
| tree | bc8fe5a59815a97a8c31075d842856d097ea4cee | |
| parent | Added a comment about Announces of non-Notes. (diff) | |
| download | snac2-564b5b1161adaab9170f52535e2dfa17edc2a18c.tar.gz snac2-564b5b1161adaab9170f52535e2dfa17edc2a18c.tar.xz snac2-564b5b1161adaab9170f52535e2dfa17edc2a18c.zip | |
add mastodon profile header to mastodon api
| -rw-r--r-- | mastoapi.c | 10 |
1 files changed, 10 insertions, 0 deletions
| @@ -540,6 +540,16 @@ xs_dict *mastoapi_account(const xs_dict *actor) | |||
| 540 | avatar = xs_fmt("%s/susie.png", srv_baseurl); | 540 | avatar = xs_fmt("%s/susie.png", srv_baseurl); |
| 541 | 541 | ||
| 542 | acct = xs_dict_append(acct, "avatar", avatar); | 542 | acct = xs_dict_append(acct, "avatar", avatar); |
| 543 | acct = xs_dict_append(acct, "avatar_static", avatar); | ||
| 544 | |||
| 545 | xs *header = NULL; | ||
| 546 | xs_dict *hd = xs_dict_get(actor, "image"); | ||
| 547 | |||
| 548 | if (xs_type(hd) == XSTYPE_DICT) | ||
| 549 | header = xs_dup(xs_dict_get(hd, "url")); | ||
| 550 | |||
| 551 | acct = xs_dict_append(acct, "header", header); | ||
| 552 | acct = xs_dict_append(acct, "header_static", header); | ||
| 543 | 553 | ||
| 544 | /* emojis */ | 554 | /* emojis */ |
| 545 | xs_list *p; | 555 | xs_list *p; |