Parcourir la source

Send a scope with the token

Mastodon API includes sope with a token.
Send an empty value if we don't have a scope.
trondd555 il y a 3 mois
Parent
commit
8084252f27
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      mastoapi.c

+ 2 - 0
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";