Commit graph

5835 commits

Author SHA1 Message Date
Translation updater bot be66cc9c9e Localisation updates from https://translatewiki.net.
Change-Id: I219f0c8574b914576b769afc077cba516859d15c
2020-09-16 09:07:03 +02:00
jenkins-bot 3c1b1b2d5d Merge "Change echo_push_* column types from TEXT to BLOB" 2020-09-15 08:36:40 +00:00
DannyS712 357c8224ae NotificationsTest: No need to set $wgUser
Bug: T243732
Change-Id: I85e25ebc636a1cfce8a06614adad8d7afb68965f
2020-09-15 01:01:11 +00:00
Michael Holloway 27a6a1fb00 Change echo_push_* column types from TEXT to BLOB
Per DBA review feedback, BLOB is more commonly used and may be
preferable.

Bug: T246716
Change-Id: I499d8c548088453d3182174f6f035977e8802240
2020-09-14 21:35:01 +00:00
Michael Holloway c20f21f7d2 Update description comment for eps_topic
Update the comment to reflect that the column content will be a
reference to an echo_push_topic row ID rather than topic text.

Bug: T261756
Change-Id: I456165df24ecc5a90d4ebcefe50f81459d7c352e
2020-09-14 16:36:48 -04:00
jgiannelos 4abfbd3c96 Normalize eps_topic
* 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
2020-09-14 15:52:23 -04:00
Translation updater bot 6c4d8045c1 Localisation updates from https://translatewiki.net.
Change-Id: I96a8a20929c078e2ea7d2a5dc223b099291bc04d
2020-09-14 09:14:19 +02:00
Ostrzyciel a585ad635a Explicitly provide sysop user in unit tests that need it
Currently Echo assumes the default user used when ->editPage() is
called to be a sysop user… which is kind of the case? It passed null
to WikiPage::doEditContent() which in turn falls back to the default
user (127.0.0.1). In a test that relies on the user to be a sysop, it's
better to provide the user explicitly to avoid confusion.

This is to clean up the confusion introduced by ->editPage()'s doc
block, see: I9f77474f40e0f6901aa2c6f846e471b822636aa5

Change-Id: I7a79e0eaa1617e4d87a8d615a5391723c0e30b6a
2020-09-13 08:16:45 +00:00
libraryupgrader f021dbf077 build: Updating bl to 4.0.3
* https://npmjs.com/advisories/1555

Change-Id: If4bb62b7c40c4df8582cc42b6b07c677467c7775
2020-09-08 20:16:30 +00:00
Translation updater bot a3616cefee Localisation updates from https://translatewiki.net.
Change-Id: Ib5b2c496fcd9677657e114513e0486e1bd96f22d
2020-09-08 10:24:04 +02:00
arttsymbar 355e171eaa Notification: add skin specific(WikimediaApiPortal) z-index for menu overlay
Bug: T259735
Change-Id: Ib46d77a7d78107282b14e84bedb545886ba182e8
2020-09-07 11:30:26 +03:00
Translation updater bot 0e75c867af Localisation updates from https://translatewiki.net.
Change-Id: I8285bcabf04c45d6cc9ccec28552bf65a73fc21a
2020-09-06 20:55:30 +02:00
libraryupgrader 831ca07708 build: Updating npm dependencies
* eslint-config-wikimedia: 0.16.2 → 0.17.0
  The following rules are failing and were disabled:
  * no-shadow

* grunt: 1.2.1 → 1.3.0

Change-Id: I4d5110b481ec491b7230cc689eda4f925ca66645
2020-09-05 13:48:38 +00:00
Reedy 257de880c1 Make use of BatchRow(Iterator|Writer)::setCaller
Bug: T261014
Change-Id: I51df93a9ed998c25e632c35b0fcc531615ddfb80
2020-09-05 03:45:55 +00:00
Reedy 82896eff62 Ignore usage of $wgUser
Bug: T262110
Change-Id: Ia4a24d0216ce33d3ae915c12619c149d54d321b2
2020-09-05 03:16:37 +00:00
Translation updater bot c1937cefb7 Localisation updates from https://translatewiki.net.
Change-Id: I49e5826f1f1a368484642c91e20965ab2a73f92d
2020-09-03 10:04:37 +02:00
Translation updater bot 04a12288be Localisation updates from https://translatewiki.net.
Change-Id: Ifbb8d9f715c4b7a40c26c02ec5a11a970d04fe55
2020-09-02 09:40:22 +02:00
Translation updater bot ce3e271f77 Localisation updates from https://translatewiki.net.
Change-Id: I1ed56b1d3e3c8f9a139e95c04750a0f4a31f22bf
2020-08-31 09:48:21 +02:00
Translation updater bot 5340ca6552 Localisation updates from https://translatewiki.net.
Change-Id: I10414b68428ec1e31b5b86d49dfe11ba64672bd1
2020-08-28 10:23:39 +02:00
Translation updater bot ef800cc9f4 Localisation updates from https://translatewiki.net.
Change-Id: Id63488b5e45df19bbc9cfbe424ddd9720fa5c1fb
2020-08-27 09:51:41 +02:00
Translation updater bot c1bbdb63d8 Localisation updates from https://translatewiki.net.
Change-Id: I5210eefde11a71d6afbc9327c60c5700e4522da5
2020-08-26 09:50:51 +02:00
Translation updater bot 5bc1650c7d Localisation updates from https://translatewiki.net.
Change-Id: Ide0b2e94671749624e2b43c9a00870af209aaf32
2020-08-25 09:46:21 +02:00
Bernd Sitzmann e1c1e89ade Fix grammar in push notification delete api string
Follow-up from Ia6c17588ee94e6be74e5e3a75eb33e38f172fc93.

Change-Id: I7ae5a4fb9dad7dc89b0d0a7292c5f87aec225698
2020-08-24 11:33:20 -06:00
jenkins-bot 763e7ab1bb Merge "Create push subscription manager group/right to clean up dead subs" 2020-08-24 10:23:31 +00:00
Translation updater bot b938b53d97 Localisation updates from https://translatewiki.net.
Change-Id: I573a44734e9a288d0339efed53be8c4d91fc033a
2020-08-24 11:57:55 +02:00
jenkins-bot ad10501af4 Merge "Collect baseline event and notification stats" 2020-08-21 14:05:48 +00:00
Translation updater bot 007ada3a22 Localisation updates from https://translatewiki.net.
Change-Id: I4a7b14c3bbd33487f5e596502bf29c50286486d5
2020-08-21 08:40:48 +02:00
Michael Holloway 3513c642dd Create push subscription manager group/right to clean up dead subs
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
2020-08-20 17:08:48 -04:00
Michael Holloway 74c1a5bbc7 Collect baseline event and notification stats
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
2020-08-20 13:55:03 -04:00
Translation updater bot d0493529af Localisation updates from https://translatewiki.net.
Change-Id: I2f5aebb831bfd0a32ce9b23c4ed5c2db4eb8f60a
2020-08-20 08:26:50 +02:00
Translation updater bot ea297783af Localisation updates from https://translatewiki.net.
Change-Id: I5b74f46671a63f7d05cf6a27ee0518b24030bbd3
2020-08-19 08:38:29 +02:00
Mateus Santos c188dac23f push: send apns topic when present
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
2020-08-18 13:21:20 +00:00
jenkins-bot abb59057e9 Merge "Fix query condition building in EmailBatch" 2020-08-18 01:13:25 +00:00
jenkins-bot 22869fb3c6 Merge "Fix: Add newly created aria-label message to extension.json" 2020-08-17 07:59:59 +00:00
Translation updater bot b7467e2f2b Localisation updates from https://translatewiki.net.
Change-Id: If771383b0b4663ecedb753ec9f7761edc2b35e23
2020-08-17 08:42:27 +02:00
edwintam ad8f052a69 Fix: Add newly created aria-label message to extension.json
Bug: T260505
Change-Id: I585156b666dbe9ae0a04d03ac9fb8b951b97fbd4
2020-08-16 19:38:21 -07:00
DannyS712 d24df030a3 Remove legacy ApiBase::getTokenSalt() overrides
Method was removed in 1.24, extension requires MW 1.35+,
so overrides aren't used

Change-Id: Ia543a06c3fcefce3429c0031b813b742feee76f1
2020-08-15 05:30:58 +00:00
Matěj Suchánek 52f4babb26 Fix query condition building in EmailBatch
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
2020-08-14 11:18:07 +00:00
Translation updater bot 7afe18f996 Localisation updates from https://translatewiki.net.
Change-Id: Ic394b009fe89406ed3d18bf7f705f9d7635f846d
2020-08-14 08:37:46 +02:00
jenkins-bot aa1f1801e4 Merge "Create and enforce a config setting for max subscriptions per user" 2020-08-13 17:03:05 +00:00
jenkins-bot 79f06475f3 Merge "Use more canonical (object)[] instead of new stdClass" 2020-08-13 11:03:26 +00:00
jenkins-bot 63e2dd4efa Merge "Remove calls to ParserOptions::setTidy()" 2020-08-13 10:19:17 +00:00
Thiemo Kreuz e5fead8b42 Use more canonical (object)[] instead of new stdClass
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
2020-08-13 09:58:14 +00:00
Thiemo Kreuz 9474b9c942 Remove Phan exceptions reported as unused
Change-Id: I89fa328e8878d64887518a3f49145b19ea599676
2020-08-13 09:25:05 +00:00
C. Scott Ananian 37261f977e Remove calls to ParserOptions::setTidy()
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
2020-08-12 23:41:49 -04:00
Michael Holloway 15d48278be Create and enforce a config setting for max subscriptions per user
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
2020-08-12 17:58:11 -04:00
Translation updater bot 45700120f5 Localisation updates from https://translatewiki.net.
Change-Id: Ice4480441c501b0647881c495f0245265730c104
2020-08-12 08:19:13 +02:00
Translation updater bot 2f4e636ff1 Localisation updates from https://translatewiki.net.
Change-Id: I6a9efda643ebb7d870a3d5e0d19bfdafd87c84e0
2020-08-11 08:20:50 +02:00
jenkins-bot 8dd53eb8a8 Merge "Fix notification popup header always showing a scrollbar" 2020-08-10 23:38:53 +00:00
jenkins-bot 0d414cf1ec Merge "Add all ResourceLoaderModules using supported hook" 2020-08-10 20:21:21 +00:00