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
Deprecated in T342301 in v1.41. This is now tracked
automatically. The variable can be safely deleted.
Change-Id: I3864ee85e8b0ff74385eee88018a37f61927f5ef
Changes to the use statements done automatically via script
Addition of missing use statements done manually
Change-Id: Iad87245bf8082193be72f7e482f29e9f1bad11fc
Use mocks when possible, and add the test to the Database group
otherwise.
Also rename 2 test files to avoid a PHPUnit deprecation of file name not
matching class name.
Change-Id: I16b2392daf01f63511c82b4ed0e67a38e35ddbe1
Notably: any() is the default anyway. It doesn't really make the
tests more specific or better readable when we repeat it all the
time.
Change-Id: I56d201bfce454587b00015b7208f313dd8ed9624