Minor webfinger tweak.

This commit is contained in:
default 2022-09-22 11:35:44 +02:00
parent f2e4de7f90
commit 2a05ec3b6e

View file

@ -73,7 +73,10 @@ void webfinger_request(char *qs, int *status, char **actor, char **user)
xs *obj = xs_json_loads(payload); xs *obj = xs_json_loads(payload);
if (user != NULL) { 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) { if (actor != NULL) {