Commit graph

5570 commits

Author SHA1 Message Date
Translation updater bot 6bd34b6765 Localisation updates from https://translatewiki.net.
Change-Id: If23897f5a90e29778e01f7a03f6300b4f0ba13de
2020-06-12 08:37:43 +02:00
jenkins-bot a444d7bc16 Merge "Increase "euw_wiki" VARCHAR length from 30 to 64" 2020-06-11 17:44:43 +00:00
Paladox 374aeb5fa9 Increase "euw_wiki" VARCHAR length from 30 to 64
This is the same fix that has been done to Flow.

Database names are limited to 63 per [1], so by upping the limit
we allow longer db names (e.g db names longer than 30 characters).

[1] https://dev.mysql.com/doc/refman/5.7/en/mysql-cluster-limitations-database-objects.html

Change-Id: I0d26a77c1bb49719eebc6beead4d79a27fcd3826
2020-06-11 17:23:19 +00:00
libraryupgrader 80a95a0312 build: Updating mediawiki/minus-x to 1.1.0
Change-Id: I0531c37053ec9412d6d8f23532d634087cad041e
2020-06-11 17:11:16 +00:00
jenkins-bot c82226835b Merge "s/slave/replica/" 2020-06-11 01:01:49 +00:00
Michael Holloway 657e914513 Push: Bail out of notification job early if no subscriptions found
Change-Id: Ica8e5c0496171dba4315c27072c2d865eb747e78
2020-06-10 15:38:23 -04:00
Gergő Tisza 153db72ec4 Ensure an array is passed to ApiEchoMute::lookupIds()
The nicer approach would be setting the parameter default to [],
but that breaks ApiSandbox.

Bug: T254699
Change-Id: I6c553e27248ff7d6c696f116cb34eb238dade440
2020-06-10 13:47:05 +00:00
jenkins-bot ea200ace05 Merge "Remove overbroad DB error catching in ApiEchoPushSubscriptionsCreate" 2020-06-10 11:52:35 +00:00
Translation updater bot 3d9073cf6e Localisation updates from https://translatewiki.net.
Change-Id: Ib5b58fd9c7a9507f9f1f03aab2a9c67cc51d5f17
2020-06-10 08:28:37 +02:00
Michael Holloway c9a826190d Remove overbroad DB error catching in ApiEchoPushSubscriptionsCreate
Rather than catching all DB errors (and assuming they are duplicate
entry errors), ignore duplicate entry errors and use affectedRows() to
determine whether the subscription already existed.

Change-Id: I4d50cb8222e52cc1a4e1f0fb3f596f36cb565dbb
2020-06-09 23:48:12 -04:00
DannyS712 e4032e8e51 Remove use of the Revision object returned in WikiPage::doEditContent
Bug: T254952
Change-Id: I5ff763c0875fb1a7178deaa1c530a9fc1179c60c
2020-06-09 23:41:22 +00:00
jenkins-bot 2a38f60ab8 Merge "Push: Submit requests to configured service endpoint" 2020-06-09 17:08:31 +00:00
Reedy aa702c1471 s/slave/replica/
Bug: T254646
Change-Id: I4de3985fd8568ce07919623efe2981bc0b6c54e5
2020-06-09 02:09:44 +01:00
DannyS712 9564e1ae50 Docs: Use replica instead of slave
Bug: T254646
Change-Id: I06387e33c5207ea59db34dba3b482893ff103288
2020-06-08 23:49:00 +00:00
Michael Holloway 1d31fd753a Push: Submit requests to configured service endpoint
Finishes the implementation of the stubbed NotificationServiceClient.
Sends push notification request messages to the endpoint configured in
the EchoPushServiceBaseUrl setting. For example, to send messages to an
instance of mediawiki/services/push-notifications running on the host
machine while running MediaWiki in Docker, add the following line to
LocalSettings.php:

 $wgEchoPushServiceBaseUrl = 'http://172.17.0.1:8900/v1/message';

Bug: T252899
Change-Id: Icab7825e9080d6b1a4cfc5e12fed1da221ce4610
2020-06-08 13:37:24 +00:00
Michael Holloway a5bcc65504 Fix push subscription retrieval
Updates the push subscription query to retrieve a provider string rather
than only its numeric internal ID.

Change-Id: I910173409e48e8b6a6739d3122165c40b0d52b7f
2020-06-08 13:58:42 +02:00
Translation updater bot a145bd0cbe Localisation updates from https://translatewiki.net.
Change-Id: Iacfd69b430bd6941c59611ff085b4cfb9e87273c
2020-06-08 08:50:04 +02:00
Umherirrender 2fe223e45c Pass function name to database functions
Useful for logging

Change-Id: I95d466224ff984653051990b540f29e243915e3f
2020-06-07 03:35:53 +02:00
Translation updater bot 4fe2dab5dd Localisation updates from https://translatewiki.net.
Change-Id: Ia4165ec17ca139170cccb50b2069b217f671d1ce
2020-06-05 08:52:59 +02:00
jenkins-bot 51ddc6f5db Merge "Parse messages in string context" 2020-06-04 22:01:41 +00:00
Translation updater bot 42bd8cf10b Localisation updates from https://translatewiki.net.
Change-Id: I252f3b97b45b3a60d3c7b3d454dd1bcedf3346da
2020-06-04 08:23:42 +02:00
jenkins-bot ff5a72ca26 Merge "Muted pages: Adjust config to not show missing titles" 2020-06-03 13:23:07 +00:00
Kosta Harlan fb21b0abef Muted pages: Adjust config to not show missing titles
Bug: T46787
Change-Id: Ibb760615670ce36d198627b1628ee311b6fcb628
2020-06-03 12:49:26 +02:00
jenkins-bot 3ec0c3325a Merge "Fix positioning of the secondary actions menu" 2020-06-03 09:47:30 +00:00
Translation updater bot 2049b0a225 Localisation updates from https://translatewiki.net.
Change-Id: I712d7d95cee586f240110ca2584a098733973ed9
2020-06-03 08:30:00 +02:00
Roan Kattouw 7658e151d6 Fix positioning of the secondary actions menu
- Automatically flip the position if there's no room
- Always flip the position in bundled notifications
- Remove menuWidth and related hacks, they didn't work anyway
- Increase maximum label width a bit

Change-Id: I490a925b6265bfbb8bbedae11672fd19d4efba44
2020-06-03 04:41:13 +00:00
Umherirrender b19d4fd63b Parse messages in string context
Change-Id: I456558cb50bfe2398e24a7e9e65e939a0f936b77
2020-06-02 21:08:02 +00:00
jenkins-bot a9391e1035 Merge "Add push notifier" 2020-06-02 18:21:46 +00:00
jenkins-bot de09ddd4d9 Merge "Add push subscription management" 2020-06-02 18:21:42 +00:00
Michael Holloway ce7a46f7ed Add push notifier
Provides a basic push notifier implementation. Since the push service is
not yet in place, all it does for now is log debug output when a
notification is to be sent.

To register the push notifier, add the following configuration to
LocalSettings.php:

 $wgEchoNotifiers['push'] = [ 'EchoPush\\PushNotifier', 'notifyWithPush' ];
 $wgDefaultNotifyTypeAvailability['push'] = true;
 $wgNotifyTypeAvailabilityByCategory['system']['push'] = false;
 $wgNotifyTypeAvailabilityByCategory['system-noemail']['push'] = false;

We'll register the notifier in configuration for now, rather than
hard-coding the default in extension.json, in order to have control over
when and where it rolls out (beta vs. prod, as well as which wikis).

Since the push notifier implementation depends on jobs being processed
by the job queue, I also recommend adding the following configuration
setting to ensure that all pending jobs are processed at the end of each
web request:

 // ensure all pending jobs are processed when a web request completes
 $wgJobRunRate = PHP_INT_MAX;

Bug: T252899
Change-Id: Ie7f222443045d30620ff297b006104ef18a074a8
2020-06-02 13:40:04 -04:00
Michael Holloway a3674974f1 Add push subscription management
Adds DB tables for storing push subscriptions, some DB interaction code
for retrieving them within MediaWiki, and a set of API modules for
managing them from the outside world.

When testing this patch, be sure to run maintenance/update.php to create
the new tables, and set $wgEchoEnablePush = true in LocalSettings.php
to enable the API new API module.

N.B. The current DB schema is centered on app push subscriptions. Web
push subscriptions require slightly different handling, since they are
provided by browsers as a JSON blob rather than a token string. How to
handle web push subscriptions is a question we can defer until the time
comes to add web push support.

Subscription data is stored in the echo_push_subscription table, with
provider names normalized into the echo_push_provider table. We expect to
be looking up subscriptions by central user ID, so that column is indexed.
The subscription data also includes a column to store SHA256 digests of
the subscriber tokens. This is for use as a unique key constraint, since
we expect every push token to be univerally unique, and the token values
themselves may be too large to reasonably index in MySQL.

Bug: T252899
Change-Id: I3928761b3fba12e54ff4850e9a05c68ec7772f62
2020-06-02 13:40:00 -04:00
jenkins-bot a78dd3aeaa Merge "Remove rollback from generateSampleNotifications" 2020-06-02 11:22:44 +00:00
Translation updater bot 7430467058 Localisation updates from https://translatewiki.net.
Change-Id: I548129adbc4fa3dd8ce21bb31ae7b5778c4f3ab6
2020-06-02 08:26:35 +02:00
Translation updater bot dc948eaa0f Localisation updates from https://translatewiki.net.
Change-Id: Ib79f7d3cbb3d18984e6826e47ccf3783d7ea7556
2020-06-01 09:57:06 +02:00
libraryupgrader 768ad83c58 build: Updating composer dependencies
* php-parallel-lint/php-console-highlighter: 0.4.0 → 0.5.0
* php-parallel-lint/php-parallel-lint: 1.0.0 → 1.2.0

Additional changes:
* Replaced "jakub-onderka" packages with "php-parallel-lint".

Change-Id: Ied823c385d7c03f79f3522277d8500b810d17b13
2020-05-31 14:57:47 +00:00
Umherirrender 24ab1eb35c build: Bump phan to 0.10.2, remove taint-check
Change-Id: I27fe6a6d248a25e70f4b18f36cf75736ef949bc5
2020-05-31 16:57:07 +02:00
libraryupgrader 8d888595ef build: Updating mediawiki/mediawiki-codesniffer to 31.0.0
The following sniffs are failing and were disabled:
* Generic.Files.LineLength.TooLong

Additional changes:
* Replaced "jakub-onderka" packages with "php-parallel-lint".

Change-Id: Ibe6a0bc27cefd6da49192032785ed4ee00c56587
2020-05-29 13:24:56 +00:00
DannyS712 37cde0b9f2 UserClearNewTalkNotification: Only require a UserIdentity
Bug: T253435
Change-Id: I5e0d7a6300dfd6acda754e6334a6e3f58900d753
2020-05-29 08:40:47 +00:00
Translation updater bot c56f992a72 Localisation updates from https://translatewiki.net.
Change-Id: I277f4e3f21f7257de5a6a011bb304c7b769ec098
2020-05-29 08:32:18 +02:00
jenkins-bot bf3aeb1280 Merge "Replace hard-deprecated WikiPage::getRevision call in generateSampleNotifications.php" 2020-05-28 17:57:18 +00:00
Translation updater bot 9e48c785b7 Localisation updates from https://translatewiki.net.
Change-Id: I00bb33e67e6b791909b6388ce41c45cc0b88c076
2020-05-28 08:39:13 +02:00
jenkins-bot 0b4f4d9659 Merge "Add dynamic secondary action to mute/unmute page-linked notifications" 2020-05-27 14:01:15 +00:00
Gergő Tisza dd1aed2930
Replace hard-deprecated WikiPage::getRevision call in generateSampleNotifications.php
...but keep soft-deprecated WikiPage::doEditContent because no realistic
replacement exists :/

Change-Id: Iee8c2fcfcbd5cb8c15854b1ada9eb691a2197658
2020-05-27 15:44:59 +02:00
Roan Kattouw 28f432b150
Add dynamic secondary action to mute/unmute page-linked notifications
Also adds an API module for muting and unmuting pages (and users).

Bug: T46787
Bug: T115264
Change-Id: Icf4e4bfa9fd7fa27b4c40892e3d5ce000eb22d5a
2020-05-27 15:20:08 +02:00
Translation updater bot 31b4c9bdfa Localisation updates from https://translatewiki.net.
Change-Id: Ib22b1736cd053a5b004abc72c1958e341909fec3
2020-05-27 08:48:34 +02:00
Translation updater bot fb34dd6b31 Localisation updates from https://translatewiki.net.
Change-Id: I421383eceef6834453238f109dc2476a18c468ba
2020-05-26 08:35:48 +02:00
Kosta Harlan 5e9eac03d0 Change pref header to specify it's about page link notifications
If/when we add other notification types, we could switch this string back to
"Muted pages" and nest other notification types underneath, or we could use a
different UI pattern for exposing those preferences.

Bug: T46787
Change-Id: I66cb2795a17994197b8610d04691dfca55ebc588
2020-05-25 19:15:39 +02:00
Translation updater bot ab437dbdec Localisation updates from https://translatewiki.net.
Change-Id: Id84d5bf2b2aafe58340048a308b3663acb6fa651
2020-05-25 08:39:35 +02:00
Translation updater bot 190d53ba3f Localisation updates from https://translatewiki.net.
Change-Id: I87e8061c879893dd1e7e93c3aed3dd4176cf6993
2020-05-22 08:34:59 +02:00
jenkins-bot 070a5dc475 Merge "Use HttpRequestFactory::createMultiClient()" 2020-05-21 20:33:48 +00:00