We just merged some updates to the /user/change_user_settings endpoint to add a bunch of user settings that were previously only found in the web ui. I have tried to compile them in a list below. However, first I wanted to provide a bit of extra information about the visibility settings that have been added.
Part of this update adds visibility controls for NSFW posts, NSFL posts, and posts made by bot accounts. Previously in the api, NSFW and NSFL controls were just a simple on/off control. I have retained those fields as a Boolean so that nothing breaks with existing api clients. However, I have added new fields that override the old ones if they are provided. They offer a more fine-grained control over the visibility of the content that mirrors what is available in the web ui. Namely, the new options are:
Show- posts show up in the feedHide- completely hides the posts from the feedBlur- In the web ui, this setting blurs any thumbnail or text previews associated with these posts until the thumbnail is expanded or the post is clicked into. This feature would need to be implemented client side to match your client’s styling if you want to support it.Transparent- In the web ui, this setting makes these posts semi-transparent (css:opacity: 0.2;) until the thumbnail is expanded or the post is clicked into. This feature would need to be implemented client side to match your client’s styling if you want to support it.
As mentioned above, these settings are available for three different kinds of content; bot posts through the bot_visibility setting, nsfw posts through the nsfw_visibility setting, and nsfl posts through the nsfl_visibility setting. The old show_nsfw and show_nsfl fields are still there, but are overridden if the corresponding field is provided. Also, as part of this, the LocalUser schema now returns additional fields for the new settings. There are now the three fields there as well as the show_nsfw and show_nsfl fields. The show_* fields will be marked as true for any visibility option other than Hide. If you have questions, feel free to ask here or hit us up on matrix or zulip.
Without further ado, here are the new fields in the /user/change_user_settings endpoint:
accept_private_messages- controls who the user will accept private messages frombot- marks or unmarks the user as a bot accountbot_visibility- as discussed above, offers more options for how to display bot posts (will need to be implemented client side if you plan to support them)community_keyword_filter- a list of words which will prevent communities with those words in their name from appearing in the user’s feedemail_unread- receive an email about unread notifications occasionally (if the local admin has set it up)federate_votes- setting to control whether the user’s votes are federated out (more public) or only stay on the local instance (more private)feed_auto_follow- setting that auto-subscribes to any community in a feed that the user subscribes tofeed_auto_leave- setting that auto-unsubscribes to any community in a feed that the user unsubscribed to (if the user subscribed outside of being auto-subscribed, then they will not be auto-unsubscribed)hide_low_quality- setting that hides communities that are marked as low quality by the local admin from the user’s feedindexable- setting to allow the user’s posts to show up using the search functionnewsletter- subscribe to the local instance’s newsletter (if the local admin has set it up or ever uses it)nsfl_visibility- as discussed above, offers more options for how to display nsfl posts (will need to be implemented client side if you plan to support them)nsfw_visibility- as discussed above, offers more options for how to display nsfw posts (will need to be implemented client side if you plan to support them)reply_collapse_threshold- in the web ui, post replies below this score are automatically collapsed, but can still be expanded to be viewed (will need to be implemented client side if you plan to support this)searchable- setting to allow the user to show up in the user list on the instancereply_hide_threshold- in the web ui, post replies below this threshold are automatically hidden completely (will need to be implemented client side if you plan to support this)
I have pushed these changes to the crust server (swagger here). Let us know if you run into any issues or have feedback/questions/suggestions!
Great!


