https://bugzilla.wikimedia.org/show_bug.cgi?id=61555
Bug ID: 61555 Summary: Check for new messages on wiki during bot run Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: valhallasw@arctus.nl Web browser: --- Mobile Platform: ---
At the moment (at least for core, and probably also for compat), new messages are only seen if the bot is restarted. For long-running bots, it's sensible to break/pause/stop editing on a certain wiki when a talk page is edited.
Getting the info from the wiki is easy -- just add meta=userinfo&uiprop=hasmsg to the api query. Afterwards, meta=notifications can be used for details.
Added bonus: every api query returns a check whether the user is still logged in correctly.
https://bugzilla.wikimedia.org/show_bug.cgi?id=61555
--- Comment #1 from Ricordisamoa ricordisamoa@live.it --- (In reply to Merlijn van Deen from comment #0)
Every n seconds? Or every x edits?
https://bugzilla.wikimedia.org/show_bug.cgi?id=61555
Ricordisamoa ricordisamoa@openmailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugzilla.wikimedia. | |org/show_bug.cgi?id=55032
https://bugzilla.wikimedia.org/show_bug.cgi?id=61555
--- Comment #2 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 137980 had a related patch set uploaded by Ricordisamoa: PROOF-OF-CONCEPT: check own talk, a custom page, and notifications
https://gerrit.wikimedia.org/r/137980
https://bugzilla.wikimedia.org/show_bug.cgi?id=61555
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=61555
--- Comment #3 from Merlijn van Deen valhallasw@arctus.nl --- Just a quick note -- when tracing the http calls made by pywikibot, I noticed it already does a lot of 'check user status' calls, including a check for talk page messages. I haven't traced where these calls come from, though, and AFAIK the bot also doesn't respond to the information.
https://bugzilla.wikimedia.org/show_bug.cgi?id=61555
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |NEW CC| |jayvdb@gmail.com
--- Comment #4 from John Mark Vandenberg jayvdb@gmail.com --- no code to review yet
(In reply to Merlijn van Deen from comment #3)
Just a quick note -- when tracing the http calls made by pywikibot, I noticed it already does a lot of 'check user status' calls, including a check for talk page messages. I haven't traced where these calls come from, though, and AFAIK the bot also doesn't respond to the information.
Ive only seen that in the log init code, which we have a bug & patch about.
pywikipedia-bugs@lists.wikimedia.org