snac2

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

commit 2a05ec3b6ee5944f7eded6dd23c2326473c589e4
parent f2e4de7f9046533795b54a5930b4186506f538e0
Author: default <nobody@localhost>
Date:   Thu, 22 Sep 2022 11:35:44 +0200

Minor webfinger tweak.

Diffstat:
Mwebfinger.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/webfinger.c b/webfinger.c @@ -73,7 +73,10 @@ void webfinger_request(char *qs, int *status, char **actor, char **user) xs *obj = xs_json_loads(payload); if (user != NULL) { - *user = xs_replace(xs_dict_get(obj, "subject"), "acct:", ""); + char *subject = xs_dict_get(obj, "subject"); + + if (subject) + *user = xs_replace(subject, "acct:", ""); } if (actor != NULL) {