aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrunfink <grunfink@noreply.codeberg.org>2026-04-13 12:11:45 +0200
committergrunfink <grunfink@noreply.codeberg.org>2026-04-13 12:11:45 +0200
commitca24e28930c9ac3987e1bbc98d1969ea6d52dd0c (patch)
tree6cd0d0bc763eab5ebd59e2e68c60331f9808bd20
parent53318b18494f7b6db2f2fe2137a9f8bbae2a732b (diff)
parent8084252f27cbf205c4ae346ea533f4ea348dc661 (diff)
Merge pull request 'Send a scope with access token' (#605) from trondd555/snac2:token_scope into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/605
-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";