mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-25 00:05:29 +00:00
bfbfa6be62
Both in the order of the cross-wiki bundles themselves, and in the message in the notification body. ForeignNotifications tracks timestamps per wiki per section, and exposes these through getWikiTimestamp(). ApiEchoNotifications adds these timestamps to the sources manifest, and also sorts the list of wikis by timestamp (it'd be nicer to do this in ForeignPresentationModel instead, but then we'd have to create a new ForeignNotifications instance which causes a duplicated DB query). NotificationsModel receives the timestamp for its wiki as its fallback timestamp, and makes getTimestamp() return this value during the pre-population phase. This causes its parent to automatically sort it correctly. Because the timestamp of a wiki depends on the section (alerts vs messages), we can't put it in the global sources manifest at the top level of the API response. Instead, get rid of this global sources manifest and put all the sources data in the foreign notifications directly. This allows us to specify different timestamps, and also allows us to get rid of code in EchoApi that was already remapping the API response to this format. Bug: T130298 Change-Id: Ie083fbb1ccaf74fbe804633d87ef03c9e71b120f |
||
---|---|---|
db_patches | ||
i18n | ||
images | ||
includes | ||
maintenance | ||
modules | ||
scripts | ||
tests | ||
.csslintrc | ||
.gitignore | ||
.gitreview | ||
.jscsrc | ||
.jshintignore | ||
.jshintrc | ||
.mailmap | ||
.rubocop.yml | ||
autoload.php | ||
composer.json | ||
COPYING | ||
Echo.alias.php | ||
Echo.php | ||
echo.sql | ||
Gemfile | ||
Gemfile.lock | ||
Gruntfile.js | ||
Hooks.php | ||
Makefile | ||
package.json | ||
phpcs.xml | ||
Rakefile | ||
RELEASE_NOTES | ||
Resources.php |