Hi,
I’ve spent several hours trying to update users email preferences via the api, and haven’t had much luck. Specifically, I want to enable Activity Summary and turn of Mailing list mode.
Has anyone done this and succeeded and can point me at where I’ve gone wrong?
Some examples below.
I tried this with and without the user/user option layers. Unfortunately there isn’t a meaningful error, just a page of html spat out.
$ curl -X POST --data ‘user: { user_option: {“mailing_list_mode_frequency”: 1, “email_direct”: True, “mailing_list_mode”: False, “email_digests”: True, “email_in_reply_to”: True, “enable_quoting”: True, “like_notification_frequency”: 1, “email_always”: True, “email_private_messages”: True, “email_previous_replies”: 1, “include_tl0_in_digests”: True}}}’ “https://discuss.example.com/users/karl_goetz?api_key=[..]&api_username=karl_goetz”
Forums
Using pydiscuourse (installed from pip), has also failed. Some examples of me finding with the options:
discourse_client.set_preference(mailing_list_mode=False, email_digests=True, email_direct=True, email_in_reply_to=True, email_private_messages=True, digest_after_minutes=1440, include_tl0_in_digests=True)
discourse_client.set_preference(‘karl_goetz’, email_always=True, mailing_list_mode=False, email_digests=True, email_direct=True, email_in_reply_to=False, email_private_messages=True, email_previous_replies=1, digest_after_minutes=1440, include_tl0_in_digests=True)
I can change my user preferences via chrome at example.com/u/karl_goetz/preferences/emails so that bit works and if nothing else I’ll try pushing data in through that route.