jenkins-bot has submitted this change and it was merged.
Change subject: Only mark edits as a bot in User talk namespace
......................................................................
Only mark edits as a bot in User talk namespace
Only add the 'bot' parameter when the namespace is NS_USER_TALK
Bug: T67180
Change-Id: I154bd4ea0f34bb242c6703f26cbcf3dea9f0962c
---
M includes/job/MassMessageJob.php
1 file changed, 5 insertions(+), 2 deletions(-)
Approvals:
Wctaiwan: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/job/MassMessageJob.php b/includes/job/MassMessageJob.php
index 985887d..dded081 100644
--- a/includes/job/MassMessageJob.php
+++ b/includes/job/MassMessageJob.php
@@ -141,7 +141,7 @@
// If we're sending to a User:/User talk: page, make sure the
user exists.
// Redirects are automatically followed in getLocalTargets
- if ( $title->getNamespace() == NS_USER ||
$title->getNamespace() == NS_USER_TALK ) {
+ if ( $title->getNamespace() === NS_USER ||
$title->getNamespace() === NS_USER_TALK ) {
$user = User::newFromName( $title->getBaseText() );
if ( !$user || !$user->getId() ) { // Does not exist
$this->logLocalSkip( 'skipnouser' );
@@ -172,10 +172,13 @@
'summary' => $this->params['subject'],
'text' => $this->makeText(),
'notminor' => true,
- 'bot' => true,
'token' => $user->getEditToken()
);
+ if ( $this->title->getNamespace() === NS_USER_TALK ) {
+ $params['bot'] = true;
+ }
+
$this->makeAPIRequest( $params );
}
--
To view, visit https://gerrit.wikimedia.org/r/179629
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I154bd4ea0f34bb242c6703f26cbcf3dea9f0962c
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Unicornisaurous <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Unicornisaurous <[email protected]>
Gerrit-Reviewer: Wctaiwan <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits