summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authorJames Seward <james@jamesoff.net>2024-01-11 13:36:16 +0000
committerJames Seward <james@jamesoff.net>2024-01-11 13:36:16 +0000
commitca27d0248a9244b71f6c44e8f1b598111b17e846 (patch)
tree5f54596fca4484b59ef1049414c21db41163ce87 /mastoapi.c
parent32ce4b065911ef73f584691506698a1b1d6de23a (diff)
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.
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mastoapi.c b/mastoapi.c
index d872c5d..5c89172 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -1118,9 +1118,14 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
acct = xs_dict_append(acct, "acct", xs_dict_get(snac1.config, "uid"));
acct = xs_dict_append(acct, "display_name", xs_dict_get(snac1.config, "name"));
acct = xs_dict_append(acct, "created_at", xs_dict_get(snac1.config, "published"));
+ acct = xs_dict_append(acct, "last_status_at", xs_dict_get(snac1.config, "published"));
acct = xs_dict_append(acct, "note", xs_dict_get(snac1.config, "bio"));
acct = xs_dict_append(acct, "url", snac1.actor);
acct = xs_dict_append(acct, "header", "");
+ acct = xs_dict_append(acct, "header_static", "");
+ acct = xs_dict_append(acct, "locked", xs_stock_false);
+ // FIXME: check value of "type" to set this correctly?
+ acct = xs_dict_append(acct, "bot", xs_stock_false);
xs *src = xs_json_loads("{\"privacy\":\"public\","
"\"sensitive\":false,\"fields\":[],\"note\":\"\"}");