Notifications: Set canNotifyAgent per event type, rather than per event

Depends-On: I4f558654ec23757dd4ecd6986eb3e9a5593f5386
Change-Id: I40cb66596a7285ae9b961f9d85dd940d759b0abd
This commit is contained in:
Roan Kattouw 2018-10-26 17:37:23 -07:00
parent 74b229e01c
commit fb3db4779b
2 changed files with 2 additions and 1 deletions

View file

@ -42,6 +42,7 @@ class Hooks {
EchoAttributeManager::ATTR_LOCATORS => [
'EchoUserLocator::locateEventAgent'
],
'canNotifyAgent' => true,
'category' => 'login-fail',
'group' => 'negative',
'presentation-model' => PresentationModel::class,

View file

@ -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;
}