Extension talk:MassMessage

About this board

regex to extract usernames from a free text member list

Jeremyb (talkcontribs)
< input.txt perl -lne 'while (/\[\[user([ _]talk)? *: *([^ \[\]\|]+)(\|[^ \[\]\|]+)?\]\]/gi) { print "user talk:$2"; }' | sort 
| uniq > output.txt

--Jeremyb (talk) 15:36, 13 August 2022 (UTC)

Reply to "regex to extract usernames from a free text member list"

Is there a way to unsend and resend?

Miniapolis (talkcontribs)

I sent out a WikiProject-wide newsletter before realizing that there were errors on the page that was sent. I corrected the errors on the page, but is there a way to rescind a MM and then resend it? Thanks for any help.

Legoktm (talkcontribs)

You can undo all the edits the delivery account made and resend it. Other than that, it's like sending an email - there's no practical way to unsend it.

Miniapolis (talkcontribs)

Thanks for your reply; I don't think this is fixable, although in my early mass-messaging days I seem to remember someone (I forget who) helping me out of an oopsie with some kind of mass-reversion tool. Cheers!

Reply to "Is there a way to unsend and resend?"
Maksim E. Otstavnov (talkcontribs)

What's wrong with the file?

$ cat test.txt


$ php sitename/extensions/MassMessage/maintenance/sendMessages.php --pagelist test.txt --subject test.txt --message test.txt

test.txt is empty, must have some content.

MediaWiki 1.36.1, PHP 7.4.15 (cgi-fcgi), MySQL 5.7.28-log, ICU 60.2, Apache 2.4.29-1ubuntu4.16

Extensions: Echo – (1a15ef8), VisualEditor 0.1.2, MyVariables 3.5.1, NoTitle 0.4.0 (780dbb6), DynamicSidebar 1.1 (b2f3feb), Lockdown – (2409546), MassMessage0.4.0 (c9b6e87) 19:21, 22 July 2021

Maksim E. Otstavnov (talkcontribs)


$ ln -s test.txt test1.txt
$ ln -s test.txt test2.txt
$ php sitename/extensions/MassMessage/maintenance/sendMessages.php --pagelist test.txt --subject test1.txt --message test2.txt
test.txt is empty, must have some content.
Reply to "sendMessages.php"
Maksim E. Otstavnov (talkcontribs)

After previewing the form with "Тест" in "Page to be sent as a message" I don't see any sections in "Section of the page" pulldown. The page contains the following:


MediaWiki 1.36.1, PHP 7.4.15 (cgi-fcgi), MySQL 5.7.28-log, ICU 60.2, Apache 2.4.29-1ubuntu4.16

Extensions: Echo – (1a15ef8), VisualEditor 0.1.2, MyVariables 3.5.1, NoTitle 0.4.0 (780dbb6), DynamicSidebar 1.1 (b2f3feb), Lockdown – (2409546), MassMessage0.4.0 (c9b6e87) 19:21, 22 July 2021

Reply to "Section of the page?"

I suggest adding Special:Log/massmessage to Interface section of the description

Maksim E. Otstavnov (talkcontribs)

I suggest adding [[Special:Log/massmessage]] to Interface section of the description.

Reply to "I suggest adding Special:Log/massmessage to Interface section of the description" (talkcontribs)

Why this extension is useful? I didn't understand what I can do with it. If you installed it, please tell me the goal on your wiki, or an example of use.

Legoktm (talkcontribs)

It allows you to send a message to multiple users at the same time, potentially across a wikifarm. Wikimedia wikis use it for global message delivery, so newsletters and other messages can be sent to users' talk pages.

Reply to "Examples of use?"

Incoherent instructions - lists should be lists of users according to the extension description

Hoggle42 (talkcontribs)

Why are all the instructions talking about lists of pages when the extension description clearly says "The MassMessage extension allows a user to send a message to a list of users"?

How does sending a message to a page manifest itself? Are you tagging some extra content onto the page? How can a page respond to a message?

Is this a language/translation problem?

Can someone fill in this gaping hole in explaining what this extension actually does?

Whatamidoing (WMF) (talkcontribs)

The tool posts messages on a list of pages. Usually, those "pages" are specifically "user talk pages". However, they could be other kinds of pages, like Village pump pages or WikiProject pages.

Wctaiwan (talkcontribs)

I've changed the description to say pages instead of users.

Hoggle42 (talkcontribs)

ok, thank you - so it doesn't do what I thought it did and send out mass emails.

Tosfos (talkcontribs)
Reply to "Incoherent instructions - lists should be lists of users according to the extension description"

Unescaped language links - what to do?

Summary by Quiddity (WMF)

Filed as phab:T150225

Peteforsyth (talkcontribs)

I'm getting "Warning: There are unescaped language links in your message." This is for delivery of the Signpost, so it's a bunch of code -- I don't see links in wikitext. The only language code I see is this one:

<div lang="en" dir="ltr"

This help page does not explain what the problem is with wikitext (what to do if you get the error) -- but I think my problem is even deeper than that. Any ideas? -Pete F (talk) 16:59, 4 November 2016 (UTC)

Quiddity (WMF) (talkcontribs)
Peteforsyth (talkcontribs)

I'm using the manual process at that link. (Sorry for not including it, but good job finding it!) Our automated process has been broken for several months, I believe because our bot or templates were unable to handle some updates to MediaWiki.

Here's the code: <div lang="en" dir="ltr" class="mw-content-ltr"><div style="-moz-column-count:2; -webkit-column-count:2; column-count:2;"> {{Wikipedia:Wikipedia Signpost/2016-XX-XX}} </div><!--Volume 12, Issue XX--> <div class="hlist" style="margin-top:10px; font-size:90%; padding-left:5px; font-family:Georgia, Palatino, Palatino Linotype, Times, Times New Roman, serif;"> * '''[[Wikipedia:Wikipedia Signpost|Read this Signpost in full]]''' * [[Wikipedia:Wikipedia Signpost/Single/2016-xx-xx|Single-page]] * [[Wikipedia:Wikipedia Signpost/Subscribe|Unsubscribe]] * [[User:MediaWiki message delivery|MediaWiki message delivery]] ([[User talk:MediaWiki message delivery|talk]]) ~~~~~ </div></div>

I did send it, and did not notice any problems. Here is an example of the output: https://en.wikipedia.org/w/index.php?title=User_talk:Peteforsyth&diff=747840030&oldid=747638885

Quiddity (WMF) (talkcontribs)

Does this mean you've resolved the issue? (I assume so, as my copy was delivered!)

If so, did you change/fix something in particular? (I.e. anything that should be noted in the Signpost publication docs, or, anything that should be noted in the MassMessage help docs)

Re: Signposts's automated system not working - Have you asked Jarry1250 for help? (he's the tool's maintainer, but I can't see any related questions about it in his talkpage archives or his recent (750) contributions.)

Peteforsyth (talkcontribs)

No, I have not resolved it -- I just took the chance that it would be OK, and I think I got away with something this time. But I suspect this will come up every time we publish going forward; I'd like to either (a) know for sure that it's not a problem, so I can put it in the docs that we can ignore it, or (b) fix the problem (obviously preferable!)

Thank you for pointing me to Jarry1250. I will certainly reach out to him, but not immediately; we have some personnel issues to resolve internally first, and I want to be sure we have the right technical skills "in house" at the Signpost first, before we go seeking advice or help that we might not be equipped to make use of. But regardless, very happy to know who to ask! -Pete F (talk) 22:53, 4 November 2016 (UTC)

Peteforsyth (talkcontribs)

Also -- apart from my specific issue -- I think the main page here could benefit from a little more detail on the "unescaped language links" item.

Peteforsyth (talkcontribs)

Quiddity (WMF), can you think of anywhere else I can ask? Should I create a Phabricator ticket, perhaps?

Quiddity (WMF) (talkcontribs)

Ah, the documentation explains the message at Help:Extension:MassMessage#Input_checking (note, the Help: page, not the extension page, although that talkpage redirects here).

However, I'm not sure what the problem was in your case... The pasted code doesn't contain any interwiki links misformatted as interlanguage links (unescaped language links), and I can't figure out how w:en:Wikipedia:Wikipedia Signpost/2016-11-04 would have caused any problems...

Oh... I wonder if it's due to the [[Wikipedia:...]] ? (which would work differently on other wikis, linking to Enwiki per Special:Interwiki, instead of the namespace itself, and hence potentially warrant triggering a warning like this).

I'll ask a dev, and if necessary file a task.

Quiddity (WMF) (talkcontribs)

My guess was incorrect, but there was a bug. It's been filed as phab:T150225. Just ignore the warning for now. Thanks for the nudge to look again. :-)

Legoktm (talkcontribs)
Reply to "Unescaped language links - what to do?"
Nemo bis (talkcontribs)

The term "bot" is improperly interpreted by too many users. I suggest to replace it with something that makes it clearer how it's a MediaWiki feature, as we did with the earlier accounts for automated edits (e.g. "MediaWiki default"): for instance "MediaWiki message delivery" or something. Bonus points if it's language-neutral.

Romaine (talkcontribs)

Agree with Nemo, I noticed that several projects have blocked MediaWiki bots. Romaine (talk) 02:35, 2 November 2013 (UTC)

Legoktm (talkcontribs)
Seb35 (talkcontribs)

It should be noted that this name will appear in the Notifications box, so it’s probably better to localize it, probably better before deployment (I don’t know how MediaWiki would react if the MassMessage username is changed).

Related to that, I find quite counterintuitive to receive the mass-messages from a system account (this behaviour existed with EdwardBot), since the Notifications box will say "Mediawiki message delivery left a message on your talk page"; it would be more intuitive to see "Legoktm left a message on your talk page", or something like "Mediwiki message delivery (on behalf of Legoktm) left a message on your talk page". Just an opinion, I will perhaps open a bug instead of this page.

Nemo bis (talkcontribs)

What's the notifications box? ;) I think you missed some discussions on wikitech-l etc.: this extension is currently designed for the standard MediaWiki behaviour because it was just impossible to do otherwise; other extensions trying to do shinier things will need some work to improve the interaction (e.g. fetch the name used from the signature rather than from history, or provide a way for this extension to set it).

As for localisation of MediaWiki script's names, it would be nice but a way to do it has not yet invented as far as I know.

Quiddity (talkcontribs)

The Echo notifications box (flyout & special page, and also the email if enabled) displays the name of the user who left a message on our talkpages.

I think Seb35 is asking for 1 of 2 potential features in MassMessage, namely:

  • A field where the user who is sending the massmessage can put their username, which will somehow be added to the Notifications about a new talkpage message.
    • (Not currently possible, but would be an Echo bug/feature if anything. I agree it could be useful)
  • A way to translate the username, for non-English languages.
    • (As Nemo said, this is not possible)
Background, current setup

If we add a (4tilde) signature to a MassMessage, it comes out as:

[[User:MediaWiki message delivery|MediaWiki message delivery]] ([[User talk:MediaWiki message delivery|talk]]) 19:31, 17 November 2013 (UTC)

Currently, the name of the user sending the massmessage is included, but only as a hidden comment at the very end. Eg:

<!-- Message sent by User:Quiddity@testwiki using the list at http://test.wikipedia.org/wiki/User_talk:Quiddity/MMtestlist -->

  1. A reminder (in the Special:MassMMessage interface) to add our own name in wikitext, if we want it visible at the end of the message.
  2. I think changing the auto-generated "signature" section, might be a good idea. Match the format that many "Global message delivery" messages currently use. I.E. Include links for:
  • About
  • Un/Subscribe
  • User sending
  • Account that was used to send ("User:MediaWiki message delivery")

Eg. The Signpost would end with:

About · Unsubscribe · Distributed on behalf of The ed17 by MediaWiki message delivery 21:30, 17 November 2013 (UTC)

This would help standardize (and improve the possibility of translating) the various elements that are currently erratically included, eg the 3 messages visible here and below all use a different layout and wording.

Seb35 (talkcontribs)

For the name of the user who is sending the massmessage, I wondered why choose a system account instead of the real massmessage sender user (this is a design question); I understand a point is the sender could possibly be non-existant on the receiving wiki (apart wikis belonging to a same CentralAuth system).

In the case this is a system account which delivers the message, my original point was indeed the name displayed in the notification box of Echo. I quickly checked the Echo code, and I guess it is currently not possible to display another name in place of the real user (here MediaWiki message delivery), because there is only one User object in the EchoEvent object and no "on-behalf-of" user and the EchoEvent::BeforeEchoEventInsert hook cannot change the underlying object. So if it would be useful for MassMessage (I think so), a feature request should be filled for Echo.

Quiddity, about your proposition of standardizing the footer, I think it would be really useful for translation purposes. I think it could be already possible by removing the comment markup of MediaWiki:Massmessage-hidden-comment, although this message was not originally intended to be viewed by the user.

Legoktm (talkcontribs)

I originally designed the extension to be as close to how m:User:EdwardsBot currently functions as possible.

I had looked into this earlier, but even if the person sending the message had an account everywhere, there is a bot flag logic issue (bugzilla:33461) that prevents edits from being flagged as a bot.

Legoktm (talkcontribs)

The reason 4 tildes use the bot's username is purely technical. We simply post the exact wikitext you enter to the API, which is transformed using the bot's context.

I think un/subscribe links, who was sending it, etc should all be localized on the wiki that is utilizing the tool. I imagine meta will do this since it's now reasonably easy to do so.

Seb35 (talkcontribs)

For the localisation of the MediaWiki script’s names, I initially thought to change the variable $wgMassMessageAccountUsername per-wiki/language, but it’s probably a very bad idea. Your idea of some localisation only in the history/notification box/etc. without changing the core usernames is probably better.

Legoktm (talkcontribs)

An initial version of the extension had a localized username, but after discussing this with Siebrand at Wikimania, I switched it to use just one username. There was a security issue in my implementation, but it also didn't make sense in a "global" environment like the WMF has with CentralAuth.

I have filed bugzilla:57234 to discuss sending a more specific Echo notifications, this can include a better username and message content.

This post was hidden by Quiddity (history)
This post was hidden by Mainframe98 (history)
Reply to "Default account name"
Wctaiwan (talkcontribs)
List view with in-place editing

I have been working on improving how delivery lists are stored and managed as a Google Summer of Code student. Currently, I have completed the new backend, an interface for creating delivery lists (and importing from the current format), a basic interface for editing raw list content, an API for adding / removing target pages, and a list view that supports in-place removal and addition of pages. I will also create a UI for adding / removing multiple pages simultaneously and write tests for the features I've implemented. You can track my progress here. Please feel free to raise any questions or suggestions. Thanks.

Reply to "GSoC project update"
Return to "MassMessage" page.