Commit graph

5746 commits

Author SHA1 Message Date
Translation updater bot 4d0f0dea33 Localisation updates from https://translatewiki.net.
Change-Id: Ife427ef323a9032e744fafe7a20562910c947689
2020-10-02 08:24:11 +02:00
Translation updater bot 7761d6f547 Localisation updates from https://translatewiki.net.
Change-Id: Iee928636b91a789b5010c365b97517736c3b43e3
2020-10-01 08:30:07 +02:00
Matthias Mullie a969c6d312 Make tests match actual expected format for user-locators
EchoAttributeManager::getUserCallable casts to array,
which means that even a non-array value (e.g. a simple callback)
becomes an array and NotificationController::evaluateUserCallable
will handle it just fine. But tests seemed to thing it was wrong.

Change-Id: Ia1e1e4015ebbc4d79bba5274e802911f222692c0
2020-09-30 15:54:54 +00:00
daniel 7170b0f35f Use MockHttpTrait
Use the mock HTTP request, in preparation for I1702c11928f87

Depends-On: I8ce17da7315b87b8dd0e502e601b9ac488089456
Needed-By: I1702c11928f8760bb41b41f4c7c04d7af03f62e2
Bug: T262443
Change-Id: I390856b4609635cee22253071f21ce63ff716791
2020-09-29 09:05:50 +00:00
Translation updater bot 7cac06b6f7 Localisation updates from https://translatewiki.net.
Change-Id: I97e4bee40e0cd99a79375a210a20ad6df16db516
2020-09-28 08:29:05 +02:00
libraryupgrader de6827b012 build: Updating mediawiki/mediawiki-phan-config to 0.10.3
Additional changes:
* Dropped .php5 files from .phpcs.xml (T200956).

Change-Id: I6cf9f4681e3f458fc1f71646bd2ff7323648b47e
2020-09-25 00:33:44 +00:00
Translation updater bot c4fcf16789 Localisation updates from https://translatewiki.net.
Change-Id: Iff58ae595bfb3ec784a7bca9c0ad7e3091ce9301
2020-09-21 08:29:22 +02:00
James D. Forrester 61cda882f5 Drop private EchoCachedList::ONE_DAY, unused
Change-Id: I14e53bcd593161c2fb6e29a5d280615d8694ebb4
2020-09-20 13:38:01 +01:00
Reedy 2afb728a10 Fix PSR12.Properties.ConstantVisibility.NotFound
Bug: T253169
Change-Id: I506e43629a30ef34c9154b8212878255de7d90b9
2020-09-19 21:26:38 +00:00
Translation updater bot c515e8c6ff Localisation updates from https://translatewiki.net.
Change-Id: I016e8d49a09434da91deb25f08ae2ceb5827df9c
2020-09-18 08:37:09 +02:00
Translation updater bot b4be1aaf73 Localisation updates from https://translatewiki.net.
Change-Id: I7a023e84fa1f512fe397d34b6bfcef794cc9c856
2020-09-17 08:32:26 +02:00
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