diff options
| author | grunfink <grunfink@comam.es> | 2025-07-27 04:23:31 +0200 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2025-07-27 04:23:31 +0200 |
| commit | 1a84c5eb6d7682842d605e67aa3178c27abcc5ca (patch) | |
| tree | cfdce87bd36fa713069432c71616709c659b3b3a /mastoapi.c | |
| parent | 2e982c79e1385b568d407f6e45f2b062761dec12 (diff) | |
mastoapi: the 'approve_followers' toggle can also be set from apps.
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -3712,7 +3712,7 @@ int mastoapi_patch_handler(const xs_dict *req, const char *q_path, snac snac = {0}; int logged_in = process_auth_token(&snac, req); - if (xs_startswith(cmd, "/v1/accounts/update_credentials")) { + if (xs_startswith(cmd, "/v1/accounts/update_credentials")) { /** **/ /* Update user profile fields */ if (logged_in) { int c = 0; @@ -3768,9 +3768,13 @@ int mastoapi_patch_handler(const xs_dict *req, const char *q_path, snac.config = xs_dict_set(snac.config, "metadata", new_fields); } } + else + if (strcmp(k, "locked") == 0) { + snac.config = xs_dict_set(snac.config, "approve_followers", + xs_stock(strcmp(v, "true") == 0 ? XSTYPE_TRUE : XSTYPE_FALSE)); + } /* we don't have support for the following options, yet - discoverable (0/1) - - locked (0/1) */ } |