diff options
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) | |||
| 73 | xs *obj = xs_json_loads(payload); | 73 | xs *obj = xs_json_loads(payload); |
| 74 | 74 | ||
| 75 | if (user != NULL) { | 75 | if (user != NULL) { |
| 76 | *user = xs_replace(xs_dict_get(obj, "subject"), "acct:", ""); | 76 | char *subject = xs_dict_get(obj, "subject"); |
| 77 | |||
| 78 | if (subject) | ||
| 79 | *user = xs_replace(subject, "acct:", ""); | ||
| 77 | } | 80 | } |
| 78 | 81 | ||
| 79 | if (actor != NULL) { | 82 | if (actor != NULL) { |