mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 23:44:53 +00:00
Echo: Reset user notification count when adding a new notification
Change-Id: If4057ba9f6a016189c60836c64333ac0b0572450
This commit is contained in:
parent
acd4ee2102
commit
fc0b870486
|
@ -42,8 +42,6 @@ class EchoHooks {
|
||||||
if ( $type == 'edit' ) {
|
if ( $type == 'edit' ) {
|
||||||
if ( ! $user->getOption('enotifwatchlistpages') ) {
|
if ( ! $user->getOption('enotifwatchlistpages') ) {
|
||||||
$notifyTypes = array_diff( $notifyTypes, array('email') );
|
$notifyTypes = array_diff( $notifyTypes, array('email') );
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} elseif ( $type == 'edit-user-talk' ) {
|
} elseif ( $type == 'edit-user-talk' ) {
|
||||||
if ( ! $user->getOption('enotifusertalkpages') ) {
|
if ( ! $user->getOption('enotifusertalkpages') ) {
|
||||||
|
|
|
@ -10,6 +10,7 @@ class EchoNotifier {
|
||||||
*/
|
*/
|
||||||
public static function notifyWithNotification( $user, $event ) {
|
public static function notifyWithNotification( $user, $event ) {
|
||||||
EchoNotification::create( array( 'user' => $user, 'event' => $event) );
|
EchoNotification::create( array( 'user' => $user, 'event' => $event) );
|
||||||
|
EchoNotificationController::resetNotificationCount( $user );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue