mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-27 01:33:36 +00:00
Merge pull request 'add mastodon profile header to mastodon api' (#46) from Haijo7/snac2:mastodon-profile-header into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/46
This commit is contained in:
commit
6f72a195b4
1 changed files with 10 additions and 2 deletions
12
mastoapi.c
12
mastoapi.c
|
@ -540,6 +540,16 @@ xs_dict *mastoapi_account(const xs_dict *actor)
|
|||
avatar = xs_fmt("%s/susie.png", srv_baseurl);
|
||||
|
||||
acct = xs_dict_append(acct, "avatar", avatar);
|
||||
acct = xs_dict_append(acct, "avatar_static", avatar);
|
||||
|
||||
xs *header = NULL;
|
||||
xs_dict *hd = xs_dict_get(actor, "image");
|
||||
|
||||
if (xs_type(hd) == XSTYPE_DICT)
|
||||
header = xs_dup(xs_dict_get(hd, "url"));
|
||||
|
||||
acct = xs_dict_append(acct, "header", header);
|
||||
acct = xs_dict_append(acct, "header_static", header);
|
||||
|
||||
/* emojis */
|
||||
xs_list *p;
|
||||
|
@ -576,8 +586,6 @@ xs_dict *mastoapi_account(const xs_dict *actor)
|
|||
acct = xs_dict_append(acct, "emojis", eml);
|
||||
}
|
||||
|
||||
acct = xs_dict_append(acct, "header", "");
|
||||
|
||||
return acct;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue