Page MenuHomePhabricator

Check for new messages on wiki during bot run
Open, Needs TriagePublic

Description

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.


Version: core-(2.0)
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=55032

Details

Reference
bz61555

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:06 AM
bzimport added a project: Pywikibot-General.
bzimport set Reference to bz61555.
bzimport added a subscriber: Unknown Object (????).

(In reply to Merlijn van Deen from comment #0)

Every n seconds? Or every x edits?

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

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.

jayvdb added a comment.Oct 7 2014, 7:47 AM

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.

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

Change 137980 abandoned by Ricordisamoa:
PROOF-OF-CONCEPT: check own talk, a custom page, and notifications

Reason:
John Vandenberg

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

Ricordisamoa set Security to None.
Ricordisamoa removed a subscriber: gerritbot.

Not to be seen in compat.

Avicennasis added a subscriber: Avicennasis.