diff options
author | default <nobody@localhost> | 2022-09-22 11:35:44 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2022-09-22 11:35:44 +0200 |
commit | 2a05ec3b6ee5944f7eded6dd23c2326473c589e4 (patch) | |
tree | 475412a7987d03834cc8244f482de76e73a37a04 /webfinger.c | |
parent | f2e4de7f9046533795b54a5930b4186506f538e0 (diff) |
Minor webfinger tweak.
Diffstat (limited to 'webfinger.c')
-rw-r--r-- | webfinger.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/webfinger.c b/webfinger.c index aeaf754..4d449b4 100644 --- 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) { |