commit 62dfe46
khm
·
2024-02-16 19:53:23 +0000 UTC
parent 5d4e0b0
webfinger: add webfinger profile page to links
1 files changed,
+7,
-0
+7,
-0
1@@ -172,6 +172,7 @@ int webfinger_get_handler(xs_dict *req, char *q_path,
2 /* build the object */
3 xs *acct;
4 xs *aaj = xs_dict_new();
5+ xs *prof = xs_dict_new();
6 xs *links = xs_list_new();
7 xs *obj = xs_dict_new();
8
9@@ -184,6 +185,12 @@ int webfinger_get_handler(xs_dict *req, char *q_path,
10
11 links = xs_list_append(links, aaj);
12
13+ prof = xs_dict_append(prof, "rel", "http://webfinger.net/rel/profile-page");
14+ prof = xs_dict_append(prof, "type", "text/html";
15+ prof = xs_dict_append(prof, "href", snac.actor);
16+
17+ links = xs_list_append(links, prof);
18+
19 char *avatar = xs_dict_get(snac.config, "avatar");
20 if (!xs_is_null(avatar) && *avatar) {
21 xs *d = xs_dict_new();