Alex Monk has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/95797


Change subject: Don't send rollback notification if nothing changed
......................................................................

Don't send rollback notification if nothing changed

Bug: 56574
Change-Id: If727161560ee07482293e8c012b8ba90bb5df505
---
M Hooks.php
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/97/95797/1

diff --git a/Hooks.php b/Hooks.php
index 758a1c5..13c24fc 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -789,7 +789,10 @@
        static function onRollbackComplete( $page, $agent, $newRevision, 
$oldRevision ) {
                $victimId = $oldRevision->getUser();
 
-               if ( $victimId ) { // No notifications for anonymous users
+               if (
+                       $victimId && // No notifications for anonymous users
+                       !$oldRevision->getContent()->equals( 
$newRevision->getContent() ) // No notifications for null rollbacks
+               ) {
                        EchoEvent::create( array(
                                'type' => 'reverted',
                                'title' => $page->getTitle(),

-- 
To view, visit https://gerrit.wikimedia.org/r/95797
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If727161560ee07482293e8c012b8ba90bb5df505
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to