mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-27 17:20:40 +00:00
Merge "(bug 46046) Notification should not be created for anon users"
This commit is contained in:
commit
6e8aa9b808
|
@ -204,6 +204,12 @@ class EchoNotificationController {
|
|||
|
||||
foreach ( $subscriptions as $subscription ) {
|
||||
$user = $subscription->getUser();
|
||||
|
||||
// Notification should not be sent to anonymous user
|
||||
if ( $user->isAnon() ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$notifyTypes = $subscription->getNotificationTypes();
|
||||
|
||||
$notifyTypes = array_keys( array_filter( $notifyTypes ) );
|
||||
|
|
|
@ -112,8 +112,9 @@ abstract class EchoDiscussionParser {
|
|||
// 1. the user name is not valid
|
||||
// 2. the user mentions themselves
|
||||
// 3. the user is the owner of the talk page
|
||||
// 4. user is anonymous
|
||||
if (
|
||||
!$user || $user->getId() == $revision->getUser() ||
|
||||
!$user || $user->isAnon() || $user->getId() == $revision->getUser() ||
|
||||
( $title->getNamespace() === NS_USER_TALK && $title->getDBkey() === $dbk )
|
||||
) {
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue