jenkins-bot has submitted this change and it was merged. Change subject: Make sure no other user-locators cause notifications during lqt-import ......................................................................
Make sure no other user-locators cause notifications during lqt-import Only makes sure it only imports unread LQT notifications (those should've been removed already anyway, but hey) Bug: T98996 Change-Id: I3920c8dfb5e4d5a7f2d74799daca26d202552e4c --- M includes/Import/Postprocessor/LqtNotifications.php 1 file changed, 8 insertions(+), 3 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Import/Postprocessor/LqtNotifications.php b/includes/Import/Postprocessor/LqtNotifications.php index 148644e..e6c81b5 100644 --- a/includes/Import/Postprocessor/LqtNotifications.php +++ b/includes/Import/Postprocessor/LqtNotifications.php @@ -71,10 +71,14 @@ // Insert our own user locator to decide who should be notified. // Note this has to be a closure rather than direct callback due to how // echo considers an array to be extra parameters. + // Overrides existing user-locators, because we don't want unintended + // notifications to go out here. $self = $this; - $wgEchoNotifications['flow-post-reply']['user-locators'][] = function( EchoEvent $event ) use ( $self ) { - return $self->locateUsersWithPendingLqtNotifications( $event ); - }; + $wgEchoNotifications['flow-post-reply']['user-locators'] = array( + function( EchoEvent $event ) use ( $self ) { + return $self->locateUsersWithPendingLqtNotifications( $event ); + } + ); } /** @@ -97,6 +101,7 @@ ); $it->addConditions( array( 'ums_conversation' => $activeThreadId, + 'ums_read_timestamp' => null, ) ); // flatten result into a stream of rows -- To view, visit https://gerrit.wikimedia.org/r/214049 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3920c8dfb5e4d5a7f2d74799daca26d202552e4c Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie <mmul...@wikimedia.org> Gerrit-Reviewer: Catrope <roan.katt...@gmail.com> Gerrit-Reviewer: Mattflaschen <mflasc...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits