snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 62dfe46bfbc9a9588c33aa2f4818932de0d14345
parent 5d4e0b0914ca5410c245aa1d4b4db4580a5ca278
Author: khm <khm@sciops.net>
Date:   Fri, 16 Feb 2024 11:53:23 -0800

webfinger:  add webfinger profile page to links

Diffstat:
Mwebfinger.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/webfinger.c b/webfinger.c @@ -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();