diff options
| author | 2024-02-16 20:12:23 +0000 | |
|---|---|---|
| committer | 2024-02-16 20:12:23 +0000 | |
| commit | 06660fb7746ec37c417ba28e788ae9905b19d3e6 (patch) | |
| tree | ac1692b244da5b49dfd09ad0d1b4971ea26e4ce6 | |
| parent | Fixed bug in get_attachments(). (diff) | |
| parent | webfinger: fix whitespace (diff) | |
| download | snac2-06660fb7746ec37c417ba28e788ae9905b19d3e6.tar.gz snac2-06660fb7746ec37c417ba28e788ae9905b19d3e6.tar.xz snac2-06660fb7746ec37c417ba28e788ae9905b19d3e6.zip | |
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
| -rw-r--r-- | webfinger.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/webfinger.c b/webfinger.c index 3f28b81..a883d7f 100644 --- a/webfinger.c +++ b/webfinger.c | |||
| @@ -172,6 +172,7 @@ int webfinger_get_handler(xs_dict *req, char *q_path, | |||
| 172 | /* build the object */ | 172 | /* build the object */ |
| 173 | xs *acct; | 173 | xs *acct; |
| 174 | xs *aaj = xs_dict_new(); | 174 | xs *aaj = xs_dict_new(); |
| 175 | xs *prof = xs_dict_new(); | ||
| 175 | xs *links = xs_list_new(); | 176 | xs *links = xs_list_new(); |
| 176 | xs *obj = xs_dict_new(); | 177 | xs *obj = xs_dict_new(); |
| 177 | 178 | ||
| @@ -184,6 +185,12 @@ int webfinger_get_handler(xs_dict *req, char *q_path, | |||
| 184 | 185 | ||
| 185 | links = xs_list_append(links, aaj); | 186 | links = xs_list_append(links, aaj); |
| 186 | 187 | ||
| 188 | prof = xs_dict_append(prof, "rel", "http://webfinger.net/rel/profile-page"); | ||
| 189 | prof = xs_dict_append(prof, "type", "text/html"); | ||
| 190 | prof = xs_dict_append(prof, "href", snac.actor); | ||
| 191 | |||
| 192 | links = xs_list_append(links, prof); | ||
| 193 | |||
| 187 | char *avatar = xs_dict_get(snac.config, "avatar"); | 194 | char *avatar = xs_dict_get(snac.config, "avatar"); |
| 188 | if (!xs_is_null(avatar) && *avatar) { | 195 | if (!xs_is_null(avatar) && *avatar) { |
| 189 | xs *d = xs_dict_new(); | 196 | xs *d = xs_dict_new(); |