|
@@ -339,11 +339,7 @@ int oauth_post_handler(const xs_dict *req, const char *q_path,
|
|
|
const char *cid = xs_dict_get(args, "client_id");
|
|
|
const char *csec = xs_dict_get(args, "client_secret");
|
|
|
const char *ruri = xs_dict_get(args, "redirect_uri");
|
|
|
-
|
|
|
- but if it's enabled, it makes it crash after some more steps, which
|
|
|
- is FAR WORSE */
|
|
|
- const char *scope = NULL;
|
|
|
-
|
|
|
+ const char *scope = xs_dict_get(args, "scope");
|
|
|
|
|
|
|
|
|
(AndStatus does it this way) */
|
|
@@ -1165,8 +1161,10 @@ void credentials_get(char **body, char **ctype, int *status, snac snac)
|
|
|
acct = xs_dict_append(acct, "url", snac.actor);
|
|
|
acct = xs_dict_append(acct, "locked", xs_stock(XSTYPE_FALSE));
|
|
|
acct = xs_dict_append(acct, "bot", xs_dict_get(snac.config, "bot"));
|
|
|
+ acct = xs_dict_append(acct, "emojis", xs_list_new());
|
|
|
|
|
|
- xs *src = xs_json_loads("{\"privacy\":\"public\","
|
|
|
+ xs *src = xs_json_loads("{\"privacy\":\"public\", \"language\":\"en\","
|
|
|
+ "\"follow_requests_count\": 0,"
|
|
|
"\"sensitive\":false,\"fields\":[],\"note\":\"\"}");
|
|
|
|
|
|
src = xs_dict_set(src, "note", xs_dict_get(snac.config, "bio"));
|
|
@@ -2379,6 +2377,14 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
|
|
|
const char *ruri = xs_dict_get(args, "redirect_uris");
|
|
|
const char *scope = xs_dict_get(args, "scope");
|
|
|
|
|
|
+
|
|
|
+ if (name == NULL && ruri == NULL && scope == NULL) {
|
|
|
+ args = xs_dup(xs_dict_get(req, "q_vars"));
|
|
|
+ name = xs_dict_get(args, "client_name");
|
|
|
+ ruri = xs_dict_get(args, "redirect_uris");
|
|
|
+ scope = xs_dict_get(args, "scope");
|
|
|
+ }
|
|
|
+
|
|
|
if (xs_type(ruri) == XSTYPE_LIST)
|
|
|
ruri = xs_dict_get(ruri, 0);
|
|
|
|