For some reason Echo (Flow?) doesn't let me enable/disable email notifications using API. Here is a small JS code which works fine for other preferences (tested in the console of Google Chrome 36, on MetaWiki):
( new mw.Api() ).get( { action: 'tokens', type: 'options' } ) .done( function ( data ) { ( new mw.Api() ).post( { action: 'options', change: 'echo-subscriptions-email-flow-discussion=false', token: data.tokens.optionstoken } ) .done( function ( data ) { console.log( data.warnings && data.warnings.options ); } ); } );
I tried using "1", "true" and the empty string instead of "false". The result is always the same:
Object {*: "Validation error for 'echo-category-title-flow-discussion': not a valid preference"}
On the other hand, mw.user.options.get( 'echo-subscriptions-email-flow-discussion' ) returns the string "1" or the boolean false depending on the state of the check box in my preferences. The problem is just not being able to change that value using the API. The same code works fine if I try to set e.g. "language=fr" (from core) or "betafeatures-vector-compact-personal-bar=0" (from another extension).
Version: unspecified
Severity: normal
See Also: