The pages.save_one and files.save_one API methods both include the 'notify_watchers' parameter. This is documented to allow either 'true' or 'false' as accepted values.
When a boolean value is passed to the Wikidot API, this works as documented. However, if a string "false" is passed to the Wikidot API, it is ignored and treated as if the value 'true' had been sent. Notifications will be sent to watchers.
As the API isn't rejecting the string version as an incorrect data type, it should parse it correctly.
The options here are:
- Parse string "false" to be the equivalent to boolean value false, and to not send watching emails to followers of that page.
- Alternatively, when a string value is sent to the API for the 'notify_watchers', return with an error and do not save the page/file.
To keep existing code working the first solution would be the best, but technically the second would also count as a solution.
Thanks ;-)
Non boolean values "true" and "false" works fine now.
Bartłomiej Bąkowski @ Wikidot Inc.
';.;' TeRq (Write PM)
Thanks TeRq! ;-)
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server