* DB changes
- Create a table for push topics NameTableStore
- Add a foreign key on subscriptions to normalize push topics
* Implement NameTableStore to normalize topics
* Update DB query joins to include topic from foreignkey
* Adapt code to use IDs instead of the actual topic
Bug: T261756
Change-Id: Ia7589f4a607993352d45b2dd3bcb3867d12d6e97
Creates a new push-subscription-manager group and an associated
right, manage-all-push-subscriptions. The purpose of this is to
allow privileged accounts to purge expired subscriptions from the
database on behalf of other users. A user with this right will be
permitted to delete any subscription from the DB based on the token
alone. For all other users, deletion requests will be limited to
those associated with the requesting user's central ID.
This right will be granted to a bot account on Metawiki associated
with the Wikimedia push notifications service, and the push
notifications service account will make push subscription delete
requests to the API for subscriptions for which vendor APIs return bad
subscription responses.
Additionally, the providertoken parameter to ApiPushSubscriptionDelete
is updated to allow multiple providertoken values.
Bug: T259148
Change-Id: Ia6c17588ee94e6be74e5e3a75eb33e38f172fc93
Adds statsd counters for events and notifications, both overall and by
type. (Events and notifications have a one-to-many relationship, as
notifications may be created for multiple users per event.)
These are specifically of interest to estimate the potential volume of
notifications to be handled by the new push service.
Bug: T260836
Change-Id: I41974cd30a90c674f56003e15d540a5581d19c7d
1) send apns topic when present in subscription metadata
2) check if subscription metadata is a valid JSON string
3) make epp_id column at echo_push_provider table auto_increment,
otherwise it will fail when trying to add a second row in the table
Bug: T259394
Change-Id: I785435e9f2d4ba9c14977d431d271f0fa2d0c795
array_plus (+=) does a union over keys and does not merge
sequential (integer) keys like array_merge. This probably
broke the "do not notify me of seen notifications" feature.
Use cleaner syntax for query building.
Change-Id: Ie0e8d562aec94060c18eed989bb54a9484ccb5d3
Both styles create the exact same object. Casting an array to an
object creates an stdClass object as well. The main benefit of this
syntax is that there is much less repetition. Everything is one
token instead of individual lines, where each line might contain a
typo.
Change-Id: Id43fa2c4b6bd5d9dbc60008427d4a9e14ae3811c
ParserOptions::setTidy() was already a no-op in MW 1.35, and
Echo already requires MW >= 1.35 in extension.json.
ParserOptions::setTidy() was deprecated in MW 1.35 and will be removed
in a future release.
Bug: T198214
Change-Id: I6a5378a42a6cf035296ad549525c25438803970a
Creates a EchoPushMaxSubscriptionsPerUser config setting (default: 0)
that controls the maximum number of subscriptions a user may associate
with the user's central user ID.
The setting is enforced in EchoPush\SubscriptionManager::create().
To allow creating push subscriptions for development, set
$wgEchoPushMaxSubscriptionsPerUser to a positive integer value in
LocalSettings.php:
$wgEchoPushMaxSubscriptionsPerUser = 10;
Bug: T259150
Change-Id: Ib97b6b6cbb8161dd75dad92c54b4fe4fff80c421
PersonalUrls hooks is not meant to be used to add RL modules,
its documentation says it's meant to "alter the user-specific
navigation links (e.g. "my page, * my talk page, my contributions" etc)."
Echo is already using BeforePageDisplay hook to add modules, let's
now register all our modules via that
Bug: T259872
Change-Id: I12616a9947ea0e574287443361e2180c42e48d4b
The automatic registration for these was broken, because
$wgResourceModules no longer contains Echo's modules (since they are now
registered in extension.json).
Instead, add the test files in tests/qunit/model/ explicitly in
onResourceLoaderTestModules. The tests in tests/qunit/mobile/ are
already added through QUnitTestModule in extension.json.
Delete the ext.echo.overlay tests, they were testing code that was
removed years ago.
Bug: T258818
Change-Id: I7b996dc8631a86033830cf532f1b8e85251788ad
The Revision->RevisionStore migration accidentally injected User
objects for reverted-user-id in two different places at different times.
This doesn't break, because there's backwards compatibility logic that
handles User objects appropriately, but we shouldn't be doing this.
Co-authored-by: Roan Kattouw <roan.kattouw@gmail.com>
Change-Id: I4170c207c3d4fc7f0d869c0b367b53389a70ce80
See https://en.wiktionary.org/wiki/victim
"Reverted user" is more descriptive in any case.
Bug: T254646
Change-Id: I70964850e63cdd832b2cc1799161c480f283d08c
Implement RecentChange_saveHook interface and pass Config via hook handler
declaration in extension.json.
Change-Id: I2bc5950eb6fc066b2f2a83ea84b700d02b075de9
The final iteration of Ie41331f made it clear that ::getTarget()
method of the special page can be null other than User object.
Since we know this we should not make unchecked method call on it.
Bug: T251687
Change-Id: Ib36a6c947b58780171cf5e7343e79d8724414b83
Adds additional job parameters to help diagnose the apparent issue of
jobs being performed twice on Beta.
Bug: T255068
Change-Id: Ib257a24056539487e1110fe286fa4535c3fec94a
It is the notifier implementation's responsibility to check the user's
notification preferences before sending a notification. This adds the
check.
Change-Id: I4b7fd7ea444f5a6db6d79fadb48a440d4fdf0ac9
The nicer approach would be setting the parameter default to [],
but that breaks ApiSandbox.
Bug: T254699
Change-Id: I6c553e27248ff7d6c696f116cb34eb238dade440