Page MenuHomePhabricator

look for new messages on all projects
Open, MediumPublic


Huggle is periodically looking for new messages on a WikiSite you are logged to. In case you are logged to multiple projects in same time, it should look for new messages on all of them.

Basically all what's needed is to take the current code that checks new messages and apply it in a loop for every WikiSite.

Version: unspecified
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:29 AM
bzimport set Reference to bz68502.

@Petrb You moved this to Doing back in November 2014. SHould it be moved back to Backlog, or has it been fixed?

@Petrb: Could you edit the task description to elaborate a bit more (provide pointers) what Huggle currently does, and what a contributor is expected to do exactly? After that we can import this into the GCI site...

Hi, I want to work on this. Is someone else working on it? Can someone direct me to the right direction?

Does this still need to be worked on? If yes, I am willing to do it.

Currently the check for new messages is real crap.

There is a timer in Main Window you can see the code which is called here every 20 seconds:

The check creates a new API query here:

//! \todo Check this for every site we are logged to
this->qTalkPage = new ApiQuery(ActionQuery, this->GetCurrentWikiSite());
this->qTalkPage->Parameters = "meta=userinfo&uiprop=hasmsg";

When I am looking at it it's actually quite broken at this moment, because GetCurrentWikiSite returns a wiki site of page that is currently displayed, but in case user login to multiple projects, it's always the wiki they are looking at in that moment, instead of home wiki...

The way this loop executed every 20 seconds works:

it checks if qTalkPage (API query) is currently being processed by checking if it's NULL. If it's NULL (not being processed) it launched new API query call. If it's not NULL it checks if previous API call is already finished and successful and then it checks if we got a new message or not. If yes, it changes flag Configuration::HuggleConfiguration->NewMessage which results in a notification about new message for every webpage that is loaded as next.

This needs to be completely reworked, there are many ways to do it, most simple (least coding) would be to preserve existing crappy mechanism and just change this qTalkPage API query pointer to an array of pointers, one for each site and do this all in a loop. The flag NewMessage should probably be replaced with an array as well, so that we know which sites have a new message or not.

More complicated, but proper solution would be to completely rewrite it so that it's more elegant than running a timer every 20 seconds :) but I am not really sure how, so I am OK with "lazy" solution as well

And the code which generates new message warning probably needs to be updated as well to reflect multiple sites, it's here: it's called GetShortcut which is pretty confusing, in past that function returned only shortcut used to display talk page, because this shortcut is in the message itself, but later whole HTML generating was moved there.

Let me know if anything isn't clear

hello, i love to work on this task, Is it still open? because no comment since Nov 2018


Yes, this task is still open, it's just extreme lack of active developers that resulted in nobody looking into this.

ok, i will look into it. I am Outreachy applicant looking for project to contribution on.

Petrb removed Petrb as the assignee of this task.Mar 27 2020, 7:25 PM

Hello everyone, I am Muskan Sharma, and want to contribute to Wikimedia. I have setup the development environment and want to work on this issue. Can you please help me with how exactly should I use the developer's environment to make changes to the code and push those changes to Phabricator?