commit 504bfa1
default
·
2024-03-13 09:30:03 +0000 UTC
parent df917f3
mastoapi: added more dummy fields to accounts.
1 files changed,
+8,
-1
+8,
-1
1@@ -335,8 +335,8 @@ int oauth_post_handler(const xs_dict *req, const char *q_path,
2 /* FIXME: this 'scope' parameter is mandatory for the official Mastodon API,
3 but if it's enabled, it makes it crash after some more steps, which
4 is FAR WORSE */
5-// const char *scope = xs_dict_get(args, "scope");
6 const char *scope = NULL;
7+// scope = xs_dict_get(args, "scope");
8
9 /* no client_secret? check if it's inside an authorization header
10 (AndStatus does it this way) */
11@@ -522,6 +522,12 @@ xs_dict *mastoapi_account(const xs_dict *actor)
12 acct = xs_dict_append(acct, "id", acct_md5);
13 acct = xs_dict_append(acct, "username", prefu);
14 acct = xs_dict_append(acct, "display_name", display_name);
15+ acct = xs_dict_append(acct, "discoverable", xs_stock_true);
16+ acct = xs_dict_append(acct, "group", xs_stock_false);
17+ acct = xs_dict_append(acct, "hide_collections", xs_stock_false);
18+ acct = xs_dict_append(acct, "indexable", xs_stock_true);
19+ acct = xs_dict_append(acct, "noindex", xs_stock_false);
20+ acct = xs_dict_append(acct, "roles", xs_stock_list);
21
22 {
23 /* create the acct field as user@host */
24@@ -550,6 +556,7 @@ xs_dict *mastoapi_account(const xs_dict *actor)
25 acct = xs_dict_append(acct, "note", note);
26
27 acct = xs_dict_append(acct, "url", id);
28+ acct = xs_dict_append(acct, "uri", id);
29
30 xs *avatar = NULL;
31 xs_dict *av = xs_dict_get(actor, "icon");