Page MenuHomePhabricator

Update the MassMessage extension for IP masking
Closed, ResolvedPublic

Description

As discovered in the spike task (T326923), the following needs to be changed:

MassMessageJob.php line 341
$user = User::newFromName( $title->getRootText() );
if ( !$user || !$user->getId() ) { // Does not exist

MassMessage doesn't allow posting messages to anon talk pages. I believe it should also not allow posting to temp user talk pages.

Acceptance criteria

  • Mass messages cannot be sent to the talk page of temp users

Event Timeline

Change 936749 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/MassMessage@master] Do not send mass messages to temp users

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

Change 936749 merged by jenkins-bot:

[mediawiki/extensions/MassMessage@master] Do not send mass messages to temp users

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

✅ I am unable to send a message from the mass message extension to a temporary user's talk page on a wiki with IP masking enabled:

Screenshot 2023-07-26 at 1.24.41 AM.png (1×2 px, 272 KB)


But @Daimona I may be testing something incorrectly here, but I am unable to send a mass message to anybody's talk page on German betacluster.
Here and Here are a couple of registered users. And here is a temp user. I am sending from here and getting this message saying that the talk page is not a valid pagelist no matter if I use a registered user or a temp user's talk page.

Screenshot 2023-07-26 at 1.46.22 AM.png (280×1 px, 65 KB)

@vaughnwalters That field is not for the page to send a message to, but for a page with the list of pages. And I know, this is quite confusing the first time you see it :D The extension help page has instructions on how to create a delivery list (via Special:CreateMassMessageList). Once you've created it, you can enter its title in the form and see how it behaves when the delivery list has or doesn't have temp user talk pages.

@Daimona okay thank you for that explanation. I created this list of two with Special:CreateMassMessageList and it sends to the talk page of the registered user and does not send to the talk page of the temp user, The confirmation message though when the message is sent does say that it is sent to 2 sites and it doesn't display any message that it will not display on one of these pages. As far as the AC of this ticket goes, it does seem that mass messages can still be sent to talk pages of temp users, but they just cannot be received by the talk pages of temp users. What do you think?

Screen Recording 2023-07-26 at 6.31.34 PM.gif (974×1 px, 1 MB)

@Daimona okay thank you for that explanation. I created this list of two with Special:CreateMassMessageList and it sends to the talk page of the registered user and does not send to the talk page of the temp user, The confirmation message though when the message is sent does say that it is sent to 2 sites and it doesn't display any message that it will not display on one of these pages. As far as the AC of this ticket goes, it does seem that mass messages can still be sent to talk pages of temp users, but they just cannot be received by the talk pages of temp users. What do you think?

I think the behaviour is the same for anons, right? But indeed, I think you're right in that the message is sent but cannot be delivered.

Yes that is correct, temp users function the same as anons here in that neither of them can receive mass messages to their talk pages, but both of them can be sent mass messages to their talk pages (or at least the count of messages sent by Special:MassMessage lead me to believe that messages can be sent to the talk pages). I just want to make sure that this is the expected behavior from this ticket?

Yes that is correct, temp users function the same as anons here in that neither of them can receive mass messages to their talk pages, but both of them can be sent mass messages to their talk pages (or at least the count of messages sent by Special:MassMessage lead me to believe that messages can be sent to the talk pages). I just want to make sure that this is the expected behavior from this ticket?

Yeah, I would say it is. The goal here was to treat temp users the same as anons.

Yes that is correct, temp users function the same as anons here in that neither of them can receive mass messages to their talk pages, but both of them can be sent mass messages to their talk pages (or at least the count of messages sent by Special:MassMessage lead me to believe that messages can be sent to the talk pages). I just want to make sure that this is the expected behavior from this ticket?

Yeah, I would say it is. The goal here was to treat temp users the same as anons.

Okay great, since they are now treated the same, I'm sending this to product sign off.

ifried subscribed.

As this passed QA, I'm marking this as Done.