mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-26 09:13:38 +00:00
Merge pull request 'webfinger: add profile-page relation to links' (#126) from khm/snac2:profile-page into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/126
This commit is contained in:
commit
06660fb774
1 changed files with 7 additions and 0 deletions
|
@ -172,6 +172,7 @@ int webfinger_get_handler(xs_dict *req, char *q_path,
|
|||
/* build the object */
|
||||
xs *acct;
|
||||
xs *aaj = xs_dict_new();
|
||||
xs *prof = xs_dict_new();
|
||||
xs *links = xs_list_new();
|
||||
xs *obj = xs_dict_new();
|
||||
|
||||
|
@ -184,6 +185,12 @@ int webfinger_get_handler(xs_dict *req, char *q_path,
|
|||
|
||||
links = xs_list_append(links, aaj);
|
||||
|
||||
prof = xs_dict_append(prof, "rel", "http://webfinger.net/rel/profile-page");
|
||||
prof = xs_dict_append(prof, "type", "text/html");
|
||||
prof = xs_dict_append(prof, "href", snac.actor);
|
||||
|
||||
links = xs_list_append(links, prof);
|
||||
|
||||
char *avatar = xs_dict_get(snac.config, "avatar");
|
||||
if (!xs_is_null(avatar) && *avatar) {
|
||||
xs *d = xs_dict_new();
|
||||
|
|
Loading…
Reference in a new issue