commit 63e0ca5
default
·
2024-05-22 14:14:58 +0000 UTC
parent 76f20bb
Also return an application/ld+json object in webfinger.
1 files changed,
+8,
-1
+8,
-1
1@@ -103,7 +103,8 @@ int webfinger_request_signed(snac *snac, const char *qs, char **actor, char **us
2 const char *type = xs_dict_get(v, "type");
3
4 if (type && (strcmp(type, "application/activity+json") == 0 ||
5- strcmp(type, "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") == 0)) {
6+ strcmp(type, "application/ld+json; profile=\"https:/"
7+ "/www.w3.org/ns/activitystreams\"") == 0)) {
8 *actor = xs_dup(xs_dict_get(v, "href"));
9 break;
10 }
11@@ -189,6 +190,12 @@ int webfinger_get_handler(xs_dict *req, char *q_path,
12
13 links = xs_list_append(links, aaj);
14
15+ /* duplicate with the ld+json type */
16+ aaj = xs_dict_set(aaj, "type", "application/ld+json; profile=\"https:/"
17+ "/www.w3.org/ns/activitystreams\"");
18+
19+ links = xs_list_append(links, aaj);
20+
21 prof = xs_dict_append(prof, "rel", "http://webfinger.net/rel/profile-page");
22 prof = xs_dict_append(prof, "type", "text/html");
23 prof = xs_dict_append(prof, "href", snac.actor);