ApiEchoUnreadNotificationPages::getUnreadNotificationPagesFromForeign we
sometime erroneous responses from the foreign wiki. We silently ignore
them since d8a4b6ba9, this add logging of the response payload.
Bug: T273479
Signed-off-by: Thiemo Kreuz <thiemo.kreuz@wikimedia.de>
Change-Id: I4dde4e3bb4ff2ea8b7669bb18b2689410e5e7713
…::getUnreadNotificationPagesFromForeign().
I'm not 100% sure if this fixes the code in a way it is
supposed to work. However, I see that getFromForeign() is
called 3 times in existing code, and 2 of these places
already do an isset() check. It looks like it was just
forgotten here.
Even if there is another issue to fix here, this patch:
a) silences the error, and
b) gives us more useful debug output.
Bug: T273479
Change-Id: I257620f646196c0554b9d86c849a02f5a8b9519c
User::getId() is typehinted to return int and so this cast is causing
Phan failure.
Note the method is deprecated but this patch is not meant to fix that.
Change-Id: I3b7ad419d7c28c3ad7144b8005f2fa387af58b0d
Ia1451e3e802441162eecfc5b7f6a7ba2ae72f377 introduced
the notifications content navigation, which allows skins
to choose where they want notifications to be positioned,
rather than requiring them to manually extract them from
the personal tools.
Bug: T266613
Depends-On: Ia1451e3e802441162eecfc5b7f6a7ba2ae72f377
Change-Id: I7badfd9bf9257b2537596e9f2e93248f52e4bd82
isRegistered is part of the slick UserIdentity interface, i.e.
it's the more "canonical" form. This change makes it a bit
easier to move away from using the huge (4000+ LOC) User class
everywhere, in favor of the UserIdentity interface, where
possible.
This patch is meant as a small step towards this goal. I tried
to replace some usages of User type hints already, but prefer
to go in small, incremental steps.
Change-Id: I039c7a18672dfb6ea9507752bce9ea754babd690
These dont work. Timeless provides its own skinStyles for this module:
* Revert "Timeless skinStyles should be additive not replace"
This reverts commit 98d0d296a8.
* Revert "Use skinStyles for deciding where the text-indent should apply"
This reverts commit 8adab78547.
A new implementation in Vector means these are redundant:
* Revert "Item label can now use overflow hidden"
This reverts commit b5dd7baa08.
* Revert "Drop text indent in modern Vector"
This reverts commit 150fc7a16c.
Bug: T264339
Depends-On: I2afc12504d7184583fa8331479125474c68017dc
Change-Id: Ifd0dd5a0479588664b772fb839dbbcd8d7c47320
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.ObjectTypeHintParam
* MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate
* MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected
* MediaWiki.Commenting.PropertyDocumentation.MissingVar
* MediaWiki.Usage.ExtendClassUsage.FunctionConfigUsage
Additional changes:
* Dropped .inc files from .phpcs.xml (T200956).
Change-Id: I46e3dacb3da1266ff52d614003ad911feeb7504e
* EchoEvent now supports `extra` params for job delay and deduplication
* When Echo identifies this type of param it creates a
DelayedEchoNotificationJob that will be executed after `delay` seconds
Change-Id: Ib0c6789dfe42e9703a67835909e5932c0054089f
It appears like the initial \h in this non-Unicode regular
expression matches parts of an UTF-8 character, destroying it.
This makes the final preg_match() in this method fail, when
$output is going to be used as a pattern.
Bug: T264922
Change-Id: Iaf240bc2e0808c2f57c1f8bab2589d3207915afe
Since the icon is applied to the link element it is now possible
to apply overflow hidden to the label itself when its wrapped in
a span.
Bug: T264339
Change-Id: Ifdc1d152702c1f5338fd2969cccf07971d622fc7
* 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