Commit graph

1698 commits

Author SHA1 Message Date
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
Translation updater bot c56f992a72 Localisation updates from https://translatewiki.net.
Change-Id: I277f4e3f21f7257de5a6a011bb304c7b769ec098
2020-05-29 08:32:18 +02: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
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
Translation updater bot 8e4dcdcf8f Localisation updates from https://translatewiki.net.
Change-Id: Icec468b13b588561ae87737bb6acad0bf4530bc8
2020-05-21 08:19:19 +02:00
Translation updater bot 60939778b8 Localisation updates from https://translatewiki.net.
Change-Id: If1a2dc2877c38e0fac149be2a83d9b9585f9692d
2020-05-20 08:34:56 +02:00
jenkins-bot f4cbf7bf5b Merge "Add aria-label to SpecialHelpMenuWidget" 2020-05-19 12:38:38 +00:00
Translation updater bot 48932aed89 Localisation updates from https://translatewiki.net.
Change-Id: Icc6d3805e156e62b26de850c84930e3ceed302d6
2020-05-19 08:24:21 +02:00
Volker E a569321595 Add aria-label to SpecialHelpMenuWidget
Bug: T244543
Change-Id: I04c2c47c5d20cf69f9f0602a2e535c05b01f5f3c
2020-05-18 12:35:43 -07:00
Translation updater bot 7420a54684 Localisation updates from https://translatewiki.net.
Change-Id: I3a49f590312745de109ffc790d35190f5d393681
2020-05-18 08:29:56 +02:00
Translation updater bot f54bfb63d3 Localisation updates from https://translatewiki.net.
Change-Id: I3765e509670f94e83d3cbca4fb617761201d2e16
2020-05-15 08:53:12 +02:00
Translation updater bot c044585ec8 Localisation updates from https://translatewiki.net.
Change-Id: I7fcd0b37e78aeeaa2e0fe092f70a521fb4591b6b
2020-05-14 08:32:13 +02:00
Translation updater bot 1b229d84f8 Localisation updates from https://translatewiki.net.
Change-Id: I3f3273f4afa02d9204e441afa28daf0385abdd8f
2020-05-13 08:42:29 +02:00
jenkins-bot 304f82c314 Merge "Add page linked event title muted list" 2020-05-12 21:08:47 +00:00
Translation updater bot f9fa360cf9 Localisation updates from https://translatewiki.net.
Change-Id: I7a05b2a29d415f0f2fa63083653560aab571b3ba
2020-05-12 08:21:00 +02:00
Translation updater bot c8530e2f25 Localisation updates from https://translatewiki.net.
Change-Id: Ie03991b5d01c22731da5966bc16c668889f8f056
2020-05-11 08:37:13 +02:00
Translation updater bot 2f0c79bc5a Localisation updates from https://translatewiki.net.
Change-Id: I0867f27bdec32abc7ccf7a869604f06d00e2a23d
2020-05-08 09:28:17 +02:00
Translation updater bot 8d0f6cf980 Localisation updates from https://translatewiki.net.
Change-Id: I2977638b9c1fe2d79ce8f229c38f6e1653c40c40
2020-05-07 08:34:17 +02:00
Kosta Harlan 1560528dc7 Add page linked event title muted list
* Add a section on the preference form to allow users to mute articles
  from generating "page linked" notices
* The preference will save the article title as an article ID

Depends-On: Ia0ddf78646ec4c8ae0b84b6d5b46ef5e51c8e8c1
Bug: T46787
Change-Id: I67f751eae5fdc5bccff7fe3047227d432c1cb8d5
2020-05-06 12:38:55 +02:00
Translation updater bot f355f05aff Localisation updates from https://translatewiki.net.
Change-Id: I169a6cf3b6cb9efa554ac7c2bb98bc316398bc3e
2020-05-05 08:30:19 +02:00
Translation updater bot 4b6c8fe025 Localisation updates from https://translatewiki.net.
Change-Id: I95a52d5d12c8bbf54c921c7f6eca2f15db48f4db
2020-05-01 10:00:41 +02:00
Translation updater bot 304e0273a4 Localisation updates from https://translatewiki.net.
Change-Id: I7d9d9714cbeb5be3f3b5c14898031c68e87b0fc8
2020-04-30 08:37:46 +02:00
Translation updater bot 13a0622468 Localisation updates from https://translatewiki.net.
Change-Id: I975609883f2bcd9877ea25d63ffbf902b5d092cd
2020-04-29 08:35:47 +02:00
Translation updater bot 617da122e0 Localisation updates from https://translatewiki.net.
Change-Id: I70f89679970ec06b2e7aafaf4febe1a416fae4ed
2020-04-28 08:31:58 +02:00
Translation updater bot 4a1f9b5ff0 Localisation updates from https://translatewiki.net.
Change-Id: I743e3c88d9b70fb53a058051a771a89f5304f6a3
2020-04-27 09:02:45 +02:00
Translation updater bot 39d7aa6b1c Localisation updates from https://translatewiki.net.
Change-Id: I9b560ff837b5ac7fa6453b246023972b1949c553
2020-04-24 08:22:23 +02:00
Translation updater bot c2c9846c33 Localisation updates from https://translatewiki.net.
Change-Id: I810646b307d3d80f3402ceb2a59df884b0b1156d
2020-04-23 08:42:57 +02:00
Translation updater bot 7ca12c2dcb Localisation updates from https://translatewiki.net.
Change-Id: If1792b34ddffb1982c31ac0841322e499ac1bcaa
2020-04-22 08:56:04 +02:00
Translation updater bot e8065dc6fe Localisation updates from https://translatewiki.net.
Change-Id: If6ccd5cc8669b06196c21839c67f7427ca44011c
2020-04-20 08:41:20 +02:00
Translation updater bot dbd753a0a9 Localisation updates from https://translatewiki.net.
Change-Id: Iabbfa195725125592c53b0c9c4ea6766588a6168
2020-04-17 09:06:38 +02:00
Translation updater bot 0ff96d0b1e Localisation updates from https://translatewiki.net.
Change-Id: Ie6ba7a275befe2883a5141611617b5cb9f36d4d5
2020-04-15 08:23:44 +02:00
Translation updater bot f7497d1da0 Localisation updates from https://translatewiki.net.
Change-Id: Ibae2054e0eee23b012789eaf7e2607587a52e892
2020-04-14 08:23:36 +02:00
Translation updater bot c0cbcdd24f Localisation updates from https://translatewiki.net.
Change-Id: If02584e66e06a207a0d8719383e89747641ef2a2
2020-04-13 09:00:20 +02:00
Translation updater bot 0dbfedbcc9 Localisation updates from https://translatewiki.net.
Change-Id: I25be16c5cb699b04c53bdbb3c688b38fc1fff3fd
2020-04-10 09:51:21 +02:00
Translation updater bot bb47d976ed Localisation updates from https://translatewiki.net.
Change-Id: I10b912d8b143409270cb57c6f6b55c6a0d1c97c8
2020-04-07 08:39:52 +02:00
Translation updater bot 8241fa93f3 Localisation updates from https://translatewiki.net.
Change-Id: Ie886d7423addf7619b658a01f15ad2ae0f2c5684
2020-04-06 09:01:47 +02:00
jenkins-bot ce186cf03e Merge "Add aria-label to Notifications page “Recent activity” filter widget" 2020-04-03 21:18:37 +00:00
Akinwale Alagbe b49fdb88c3 Add aria-label to Notifications page “Recent activity” filter widget
Adding `aria-label` to the filter widget, with `listbox` role assigned 
to allow screen readers parse read the content.

Bug: T244543
Change-Id: I72a4045abe9a7c391ee3fe471ed944d96259b79e
2020-04-03 20:00:22 +00:00
Translation updater bot 99eaaec519 Localisation updates from https://translatewiki.net.
Change-Id: I1be70dfa2887e55e85285149fb757321d28a7628
2020-04-03 08:28:23 +02:00
Translation updater bot 45ae01db45 Localisation updates from https://translatewiki.net.
Change-Id: I454d6bb2235542bac197601920762d27a3b87197
2020-04-02 08:24:31 +02:00
Translation updater bot 37ed47d933 Localisation updates from https://translatewiki.net.
Change-Id: I5ddbb72362309b2e03999ba4a0d6ede44eb23667
2020-04-01 08:24:51 +02:00
Translation updater bot 98efbf3415 Localisation updates from https://translatewiki.net.
Change-Id: I3d9cc4d317cd474297e33369d86e440421f32dfa
2020-03-31 08:28:40 +02:00
Translation updater bot 6999655ab2 Localisation updates from https://translatewiki.net.
Change-Id: I93a2dfb2f61084bf73bd0b4964d97ae6b97ff91f
2020-03-27 08:41:09 +01:00