Unicornisaurous has uploaded a new change for review.

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

Change subject: Only mark edits as a bit in User talk namespace
......................................................................

Only mark edits as a bit in User talk namespace

Added a isBot parameter to the editPage function.
If this parameter is true, then the "bot" parameter in the API request is set 
to true.

Bug: T67180
Change-Id: I154bd4ea0f34bb242c6703f26cbcf3dea9f0962c
---
M includes/job/MassMessageJob.php
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage 
refs/changes/29/179629/1

diff --git a/includes/job/MassMessageJob.php b/includes/job/MassMessageJob.php
index 985887d..73ea728 100644
--- a/includes/job/MassMessageJob.php
+++ b/includes/job/MassMessageJob.php
@@ -157,13 +157,13 @@
                        && defined( 'NS_TOPIC' ) && !$title->inNamespace( 
NS_TOPIC ) ) {
                        $this->addFlowTopic();
                } else {
-                       $this->editPage();
+                       $this->editPage( $title->getNamespace() == NS_USER_TALK 
);
                }
 
                return true;
        }
 
-       protected function editPage() {
+       protected function editPage( $isBot ) {
                $user = MassMessage::getMessengerUser();
                $params = array(
                        'action' => 'edit',
@@ -172,10 +172,13 @@
                        'summary' => $this->params['subject'],
                        'text' => $this->makeText(),
                        'notminor' => true,
-                       'bot' => true,
                        'token' => $user->getEditToken()
                );
 
+               if ( $isBot ) {
+                       $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: newchange
Gerrit-Change-Id: I154bd4ea0f34bb242c6703f26cbcf3dea9f0962c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Unicornisaurous <[email protected]>

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

Reply via email to