aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrondd555 <trondd555@git>2026-04-12 17:19:58 -0400
committertrondd555 <trondd555@git>2026-04-12 17:19:58 -0400
commit8084252f27cbf205c4ae346ea533f4ea348dc661 (patch)
tree6cd0d0bc763eab5ebd59e2e68c60331f9808bd20
parent53318b18494f7b6db2f2fe2137a9f8bbae2a732b (diff)
Send a scope with the token
Mastodon API includes sope with a token. Send an empty value if we don't have a scope.
-rw-r--r--mastoapi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mastoapi.c b/mastoapi.c
index f199d32..9f79b97 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -412,6 +412,8 @@ int oauth_post_handler(const xs_dict *req, const char *q_path,
if (!xs_is_null(scope))
rsp = xs_dict_append(rsp, "scope", scope);
+ else
+ rsp = xs_dict_append(rsp, "scope", "");
*body = xs_json_dumps(rsp, 4);
*ctype = "application/json";