summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authorGravatar default2024-03-13 10:30:03 +0100
committerGravatar default2024-03-13 10:30:03 +0100
commit504bfa15867f5d3d793f2ba4434945a39b3dc8a0 (patch)
treeb2afe299e27a29b1fdf3c5c936f83fc2db43dfc6 /mastoapi.c
parentmastoapi: return a dummy header field in accounts. (diff)
downloadsnac2-504bfa15867f5d3d793f2ba4434945a39b3dc8a0.tar.gz
snac2-504bfa15867f5d3d793f2ba4434945a39b3dc8a0.tar.xz
snac2-504bfa15867f5d3d793f2ba4434945a39b3dc8a0.zip
mastoapi: added more dummy fields to accounts.
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 133b4d0..cc8e144 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -335,8 +335,8 @@ int oauth_post_handler(const xs_dict *req, const char *q_path,
335 /* FIXME: this 'scope' parameter is mandatory for the official Mastodon API, 335 /* FIXME: this 'scope' parameter is mandatory for the official Mastodon API,
336 but if it's enabled, it makes it crash after some more steps, which 336 but if it's enabled, it makes it crash after some more steps, which
337 is FAR WORSE */ 337 is FAR WORSE */
338// const char *scope = xs_dict_get(args, "scope");
339 const char *scope = NULL; 338 const char *scope = NULL;
339// scope = xs_dict_get(args, "scope");
340 340
341 /* no client_secret? check if it's inside an authorization header 341 /* no client_secret? check if it's inside an authorization header
342 (AndStatus does it this way) */ 342 (AndStatus does it this way) */
@@ -522,6 +522,12 @@ xs_dict *mastoapi_account(const xs_dict *actor)
522 acct = xs_dict_append(acct, "id", acct_md5); 522 acct = xs_dict_append(acct, "id", acct_md5);
523 acct = xs_dict_append(acct, "username", prefu); 523 acct = xs_dict_append(acct, "username", prefu);
524 acct = xs_dict_append(acct, "display_name", display_name); 524 acct = xs_dict_append(acct, "display_name", display_name);
525 acct = xs_dict_append(acct, "discoverable", xs_stock_true);
526 acct = xs_dict_append(acct, "group", xs_stock_false);
527 acct = xs_dict_append(acct, "hide_collections", xs_stock_false);
528 acct = xs_dict_append(acct, "indexable", xs_stock_true);
529 acct = xs_dict_append(acct, "noindex", xs_stock_false);
530 acct = xs_dict_append(acct, "roles", xs_stock_list);
525 531
526 { 532 {
527 /* create the acct field as user@host */ 533 /* create the acct field as user@host */
@@ -550,6 +556,7 @@ xs_dict *mastoapi_account(const xs_dict *actor)
550 acct = xs_dict_append(acct, "note", note); 556 acct = xs_dict_append(acct, "note", note);
551 557
552 acct = xs_dict_append(acct, "url", id); 558 acct = xs_dict_append(acct, "url", id);
559 acct = xs_dict_append(acct, "uri", id);
553 560
554 xs *avatar = NULL; 561 xs *avatar = NULL;
555 xs_dict *av = xs_dict_get(actor, "icon"); 562 xs_dict *av = xs_dict_get(actor, "icon");