jenkins-bot has submitted this change and it was merged.
Change subject: Suppressed agent name should be hidden in API
......................................................................
Suppressed agent name should be hidden in API
bug: 56230
Change-Id: I7cac877ef0ff44a3f64828ae37ced874b720ad27
---
M api/ApiEchoNotifications.php
1 file changed, 8 insertions(+), 4 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/api/ApiEchoNotifications.php b/api/ApiEchoNotifications.php
index a570b61..75a741d 100644
--- a/api/ApiEchoNotifications.php
+++ b/api/ApiEchoNotifications.php
@@ -139,10 +139,14 @@
}
if ( $event->getAgent() ) {
- $thisEvent['agent'] = array(
- 'id' => $event->getAgent()->getId(),
- 'name' => $event->getAgent()->getName(),
- );
+ if ( $event->userCan( Revision::DELETED_USER,
$user ) ) {
+ $thisEvent['agent'] = array(
+ 'id' =>
$event->getAgent()->getId(),
+ 'name' =>
$event->getAgent()->getName(),
+ );
+ } else {
+ $thisEvent['agent'] = array(
'userhidden' => '' );
+ }
}
if ( $row->notification_read_timestamp ) {
--
To view, visit https://gerrit.wikimedia.org/r/92441
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7cac877ef0ff44a3f64828ae37ced874b720ad27
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Bsitu <[email protected]>
Gerrit-Reviewer: Bsitu <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits