Commit graph

203 commits

Author SHA1 Message Date
Umherirrender f0a7879035 Use own namespaced classes in extension.json
Also write the callable as one string in extension.json,
the newline makes it hard to read as callable.

Change-Id: I6e670907aa36effa4b9485fafbb59918d62e2f2a
2024-06-19 21:53:16 +02:00
Derk-Jan Hartman 8e1d5c978b Echo: Add missing dependency on mediawiki.user
When loading with ?debug=true, I experienced issues with
mw.user.isTemp not being defined. Seems the dependency on
mediawiki.user module was not declared when calls to this function
were added over a year ago.

Change-Id: Ic496ae384ff7f3d312a164b973c0ef74eab04da9
2024-06-02 22:15:47 +02:00
Siddharth VP 16c261dfb4 Don't assign echo-create right to bots by default
Bug: T58362
Change-Id: I7beb24631a7437f87c72665c2e7ad0e89bb1ef76
2024-05-28 00:00:33 +05:30
jenkins-bot b721cc23df Merge "configure main hook handler to pass StatsFactory service" 2024-05-27 11:48:12 +00:00
Siddharth VP e27f4937ff Add API module for sending notifications
Allows users to send notifications to themselves (T306211). For sending
notifications to others, a new permission is created (echo-create),
assigned only to bots by default. For now, only one user can be notified
in one API request.

If the email flag is set in the API params, the notification is also
sent as an email, provided the user hasn't disabled email notifications
for the "api-triggered" category.

This feature is behind a feature flag. Set $wgEchoEnableApiEvents = true
to use.

Adapted from If0267a38be7d454e3d284d30f93c93a828288dd7.
Co-authored-by: TheresNoTime <starling-ctr@wikimedia.org>

Bug: T58362
Bug: T306211
Change-Id: I94642bff5dcb075cb9db862206d59c19edad9fd1
2024-05-04 17:43:39 +03:00
Cole White e4fd529dd6 configure main hook handler to pass StatsFactory service
Bug: T363590
Change-Id: Iadf0deeb8577a44554e66989ed432e119e6cbbe3
2024-05-04 08:10:41 +00:00
Fomafix 2d9ffb7301 Inject services into NotificationDeleteJob
Change-Id: I0988e2d486eaf43cb999d38c0d2a0c81a7930cfd
2024-04-04 14:56:38 +00:00
Fomafix 73bd6e8ef1 Inject service LinkBatchFactory into ApiEchoMute
Change-Id: I98c1d2f6b1aa04eb64cef299a6aca475658bdd74
2024-03-17 19:13:44 +00:00
Ed Sanders 1b5116d668 Use native URL API, instead of deprecated mw.Uri
Change-Id: Ia6bf82de647eb051f2719c13ceff5a2b07a3721f
2024-03-05 22:08:59 +00:00
Martin Urbanec 9daf86b662 Stop inserting new user_properties rows on signup
This starts using conditional user defaults, which were
already deployed to WMF production config.

Bug: T353225
Change-Id: I93c6efc40d1ef6c46d8711fc5a4161e5d8f683e3
2024-02-26 15:09:02 +00:00
Reedy 0bc5808783 Drop schema updates from MW 1.33 and 1.34
Change-Id: I9515984e294cd3910a841a07eb3239fa20040a3e
2023-12-22 01:56:23 +00:00
gerritbot 51760eefcc Update UserOptionsManager's FQN
User-options related classes are being moved to
the MediaWiki\User\Options namespace in MediaWiki Core;
reflect that change here.

Bug: T352284
Depends-On: I9822eb1553870b876d0b8a927e4e86c27d83bd52
Change-Id: Iddefd90b03a4751fce3f44e9fa0086082b21ae93
2023-11-29 12:55:39 +00:00
Siddharth VP 035f39d76c Use dependency injection in hooks
Removal of globals for reading config to be done in a follow-up patch

Change-Id: I8652ca67375ce2f2d79de93e0a3b75ac998131e0
2023-10-14 23:44:57 +05:30
Umherirrender 5e49d52fba Call hook handler for own hooks directly and not via hook system
Extensions should not a consumer of its own hooks,
just call the code before calling the hook.
In case of EchoGetBundleRules each extension should only handle it's
own event, so this is not a breaking change.
In case if EchoAbortEmailNotification the return false in the hook
handler already aborted further hooks, so this is not a breaking change.

Change-Id: I2715aa6499d01a1c1b3a27ff510b331eae0deca9
2023-09-08 16:47:33 +00:00
jenkins-bot 8239b38530 Merge "Decommission Echo* instruments" 2023-08-29 21:47:54 +00:00
Sam Smith f4765cdd25 Decommission Echo* instruments
Completely remove the EchoMail and EchoInteraction instruments,
supporting code, and config variables.  Note well that the
EchoEventLoggingSchemas config included an entry for the
already-decommissioned Echo instrument so remove that too.

Bug: T344167
Change-Id: Ic0c44737d2c4a78ec19e67b8b8cd4e6cfb8e14fa
2023-08-29 11:27:15 +01:00
jenkins-bot 38e9654796 Merge "Drop dead code" 2023-08-23 15:06:33 +00:00
James D. Forrester 1c39c66d2b build: Update MediaWiki requirement to 1.41
All extensions in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: I7d91b7cc9929f0b2277bf3955d7f15e38b20f05b
2023-08-19 13:15:32 +08:00
Reedy 8f44150300 And a few more namespaced classes...
Change-Id: I57b56d285bac4b41e81f656f3c1ddceee4620fb5
2023-08-18 22:27:18 +01:00
Reedy b003945c34 Namespace a few more classes
Change-Id: Ie233a4c8291432da3bd25d29337db52a2e97b540
2023-08-18 21:48:15 +01:00
Reedy e576cbdca0 Namespace some more classes
Change-Id: If1405788a4adb550e8a7e8c58b0c2c55cf10ea67
2023-08-18 21:24:59 +01:00
Reedy 1bc5b6daf8 Namespace classes that need aliases
Change-Id: Ieeeaf80d04b060d6dbca1959d5e66f4c69c5a7f2
2023-08-18 19:00:41 +01:00
Jon Robson 75b6465876 Drop dead code
This code has been moved to Minerva and is no longer serving any
purpose. The handlers are replaced with an already standardized
mw.hook for Minerva to subscribe and respond to.

Bug: T342907
Depends-On: I55c18cf723a32f80b93a01dd0687e005162c4e93
Change-Id: I2f923e509d24524a2375ffbe6b3ef336487574bb
2023-08-17 13:05:12 -05:00
Umherirrender 8218e2aa23 Use HookHandlers for UserMerge hook
Bug: T315938
Depends-On: Ib78dae49854863af1a37a00636737c94694776ae
Change-Id: I948ef262b9c6f546244e64a62775068bfce79b69
2023-08-16 05:30:19 +00:00
jenkins-bot 078788f411 Merge "Create HookRunner class and the hook handler interfaces" 2023-08-16 05:26:06 +00:00
jenkins-bot 4da2ea7a18 Merge "Use HookHandlers for remaining core hooks" 2023-08-16 01:50:05 +00:00
Umherirrender 63efbc5fd1 Use HookHandlers for remaining core hooks
The use of "HookHandlers" attribute in extension.json makes it possible
to inject services into hook handler classes in a future patch.

Bug: T315938
Change-Id: I84027e2899b4a013b78fe4e95f191f1e4c89b5f8
2023-08-16 09:19:22 +08:00
WMDE-Fisch 5f7c26c764 Targets no longer needed in Echo
All match current default.

Bug: T328497
Change-Id: Id0e78ee4c62241603198727cb663843d7b1ca553
2023-08-15 19:53:53 +02:00
Umherirrender e52a792060 Create HookRunner class and the hook handler interfaces
Bug: T315938
Change-Id: Iffa2b409502b4269c9746e0304feb4aaee37a86e
2023-08-06 10:30:46 +00:00
bwang ddaf43c5a0 Update notification badge to not rely on mw-ui-icon
This will essentially all be deleted after I55c18cf723a32f80b93a01dd0687e005162c4e93, but thats fine\

Bug: T343053
Change-Id: Ifb382af388cdc24dc1ecef105ec89c9129194c19
2023-08-02 19:10:34 +00:00
Urbanecm c6dd920800 Revert "Fixes: Echo notification count disappears on load in mobile skin"
This reverts commit 38c26f66d0.

Reason for revert: causes T343192

Bug: T335273
Bug: T343192
Change-Id: I807c2b35bba86c2905931b61e9ef9d726d60a1da
2023-08-01 08:56:59 +00:00
Jon Robson 38c26f66d0 Fixes: Echo notification count disappears on load in mobile skin
Bug: T335273
Change-Id: Ife0f3093c145d10e2432d3130ba71b03cc4817a1
2023-07-28 18:52:59 +00:00
Kosta Harlan ace96cbfcf
Move edit-user-page to be adjacent to edit-user-talk
... and have "edit-user-talk" appear as the first preference.

Bug: T334531
Change-Id: I52be2aa0dbc04849fa1ba1923f89333c443412cf
2023-04-27 21:07:47 +02:00
gerritbot 7ab2ea01a1 Update moved class TitleFactory
See T321882
Moved in Iac1688172ee457

Bug: T321681
Change-Id: I8c171d4cb1413d2acd20016f85220e9a33a006da
2023-04-19 16:55:32 +00:00
jenkins-bot 1c3ab2dc12 Merge "Drop targets from ext.echo.ui.desktop" 2023-04-11 20:44:18 +00:00
Jon Robson e3965f1c42 Drop targets from ext.echo.ui.desktop
This is redundant as the check is done on the client
inside the initDesktop method inside modules/ext.echo.init.js

Bug: T332836
Change-Id: Iccf42645a2773a17b94a8c694e29b14ad9fd5086
2023-04-11 13:23:37 -07:00
Ed Sanders 91869f5708
Add notification type for user page edits
Creates a notification type to notify users when their
user page is edited.

Co-authored-by: Kunal Mehta <legoktm@debian.org>
Co-authored-by: Ed Sanders <esanders@wikimedia.org>
Bug: T3876
Change-Id: Ibe0092a96d96f6fa9d93991418b723f3e70e1b75
2023-03-31 11:21:48 +02:00
Kosta Harlan b2778d144c
icons: Support OOUI icons from editing-core bundle
Bug: T328288
Change-Id: Id3d3e447056316c01b240006905344543737cf27
2023-03-06 15:11:04 +01:00
jenkins-bot 35d89af670 Merge "Initialize Echo when CentralAuth autologin replaces the user toolbar" 2022-11-21 09:02:02 +00:00
Gergő Tisza b69a2cf57f
Initialize Echo when CentralAuth autologin replaces the user toolbar
Bug: T55134
Change-Id: I2699e84080c907c491b1becdc485fd176f3b2bca
2022-11-19 23:28:23 -08:00
Jon Robson 499684815b Move skinStyle rules to skin
Badge rendering is a responsibility of the skin (since badges
must work with JavaScript disabled). Because of this, we move the
styles to their associated skin (Monobook and Minerva)

Bug: T257143
Depends-On: I1999185d19e171900f2da5acbd39125013d3582c
Depends-On: Ib148e90a3fde42ebcf271432dce3ccfc8985c677
Change-Id: I9319c72183a312cf0f55942ba1f78aa974ce5e84
2022-11-18 16:22:35 -08:00
Bartosz Dziewoński 3ddc5c201d Use buildComparison() instead of raw SQL
Bug: T321422
Change-Id: If9ad9268d3bd7d62c3b4af4274d3d579cdd47db3
2022-11-15 12:06:04 +01:00
Reedy 5611662f06 Namespace Model
Depends-On: Id28792658de950b99a8786f881563476def59eba
Change-Id: Ib57ea2db947285946f31fa9912b37181044df9d3
2022-11-10 14:25:42 -07:00
Reedy 69139e663e Forward Event namespacing
Change-Id: Iddb4a5d4057f9c6ed00f754d2e3cd79cd873f212
2022-11-10 14:24:42 -07:00
Reedy 5c596d2d1b Namespace Special
Change-Id: If194554d8af60369699b057af5b4a2e5dab4897e
2022-11-05 16:53:56 +00:00
Alexander Vorwerk 7498391ef9 Fix NotificationDeleteJob class name
Follow-Up: Ib8870284465e00308f475fe492fa579babe23d79

Bug: T322342
Change-Id: I98e9862d27ebe63de23ef54a6bc6b74ede90e21f
2022-11-05 09:42:32 +00:00
Reedy c85fe25fe7 Namespace Mapper
Change-Id: I8a02082466ef39db32ffa7562b02db61929346cd
2022-11-04 18:05:34 +00:00
Reedy 0f0c6c4fa6 Namespace Iterator
Change-Id: I87fa703da9e7725370d72c58fc40eb204a309e67
2022-11-02 16:51:39 -06:00
Reedy 3609edf153 Namespace Cache
Change-Id: I8ead3ee485528f08f71c21cf401880bf369dbeac
2022-11-02 16:37:48 -06:00
Reedy 6046c48593 Namespace Jobs
Change-Id: Ib8870284465e00308f475fe492fa579babe23d79
2022-11-02 14:52:32 -06:00