mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/LoginNotify
synced 2024-09-23 10:20:21 +00:00
Notifications: Set canNotifyAgent per event type, rather than per event
Depends-On: I4f558654ec23757dd4ecd6986eb3e9a5593f5386 Change-Id: I40cb66596a7285ae9b961f9d85dd940d759b0abd
This commit is contained in:
parent
74b229e01c
commit
fb3db4779b
|
@ -42,6 +42,7 @@ class Hooks {
|
|||
EchoAttributeManager::ATTR_LOCATORS => [
|
||||
'EchoUserLocator::locateEventAgent'
|
||||
],
|
||||
'canNotifyAgent' => true,
|
||||
'category' => 'login-fail',
|
||||
'group' => 'negative',
|
||||
'presentation-model' => PresentationModel::class,
|
||||
|
|
|
@ -711,7 +711,7 @@ class LoginNotify implements LoggerAwareInterface {
|
|||
* @param int $count [Optional] How many failed attempts
|
||||
*/
|
||||
private function sendNotice( User $user, $type, $count = null ) {
|
||||
$extra = [ 'notifyAgent' => true ];
|
||||
$extra = [];
|
||||
if ( $count !== null ) {
|
||||
$extra['count'] = $count;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue