commit 8084252

trondd555  ·  2026-04-12 21:19:58 +0000 UTC
parent 53318b1
Send a scope with the token

Mastodon API includes sope with a token.
Send an empty value if we don't have a scope.
1 files changed,  +2, -0
+2, -0
1@@ -412,6 +412,8 @@ int oauth_post_handler(const xs_dict *req, const char *q_path,
2 
3                 if (!xs_is_null(scope))
4                     rsp = xs_dict_append(rsp, "scope", scope);
5+                else
6+                    rsp = xs_dict_append(rsp, "scope", "");
7 
8                 *body  = xs_json_dumps(rsp, 4);
9                 *ctype = "application/json";