mediawiki.api.watch: Use formatversion=2 for API requests
authorFomafix <fomafix@googlemail.com>
Mon, 25 Jan 2016 16:31:48 +0000 (16:31 +0000)
committerFomafix <fomafix@googlemail.com>
Wed, 2 Nov 2016 17:24:15 +0000 (18:24 +0100)
commitd3a4c8c5ee57e93951fdbba0f16ac835b2e60492
tree92d3306af2a53b50ab5c8e2a53406db1a2b3fa4c
parent19cd639835938da66507a1cc3623073c3217b416
mediawiki.api.watch: Use formatversion=2 for API requests

With formatversion=2 the JSON response uses UTF-8 instead of escape sequences
with hex for encoding of non-ASCII characters (e.g. "\u00e4" for "รค").

formatversion=2 has a different syntax for boolean values:
  formatversion=1: "watched": ""
  formatversion=2: "watched": true

Consumers of this API that process the response with
  response.watched === ''
must change this to
  response.watched === true

Change-Id: I087ab538b9400d774f8c2c6a8c0f55a33fab6044
resources/src/mediawiki/api/watch.js
resources/src/mediawiki/page/watch.js