commit ca27d02
James Seward
·
2024-01-11 13:36:16 +0000 UTC
parent 32ce4b0
Add missing fields to account verification This allows the Mona iOS app to successfully sign in. I wasn't sure what a suitable value for `last_status_at` would be so I just copied `published` since it's the right format. This also just sets the `bot` field to false regardless of the user's configuration, which probably isn't ideal.
1 files changed,
+5,
-0
+5,
-0
1@@ -1118,9 +1118,14 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
2 acct = xs_dict_append(acct, "acct", xs_dict_get(snac1.config, "uid"));
3 acct = xs_dict_append(acct, "display_name", xs_dict_get(snac1.config, "name"));
4 acct = xs_dict_append(acct, "created_at", xs_dict_get(snac1.config, "published"));
5+ acct = xs_dict_append(acct, "last_status_at", xs_dict_get(snac1.config, "published"));
6 acct = xs_dict_append(acct, "note", xs_dict_get(snac1.config, "bio"));
7 acct = xs_dict_append(acct, "url", snac1.actor);
8 acct = xs_dict_append(acct, "header", "");
9+ acct = xs_dict_append(acct, "header_static", "");
10+ acct = xs_dict_append(acct, "locked", xs_stock_false);
11+ // FIXME: check value of "type" to set this correctly?
12+ acct = xs_dict_append(acct, "bot", xs_stock_false);
13
14 xs *src = xs_json_loads("{\"privacy\":\"public\","
15 "\"sensitive\":false,\"fields\":[],\"note\":\"\"}");