Last modified: 2014-08-21 23:40:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T59043, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 57043 - Other extensions should be able to query Echo and be agnostic to the backend being used
Other extensions should be able to query Echo and be agnostic to the backend ...
Status: PATCH_TO_REVIEW
Product: MediaWiki extensions
Classification: Unclassified
Echo (Other open bugs)
unspecified
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-14 00:58 UTC by Jon
Modified: 2014-08-21 23:40 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jon 2013-11-14 00:58:45 UTC
In MobileFrontend MobileUserInfo::getLastThanking a query is made to Echo to discover the last 'thank' a user received.

Currently this code is messy and needs to know a lot about the existing implementation - e.g. which backend to use and which tables to query.

It would be good if a convenience function was instead provided which abstracted all this.
Comment 2 Kunal Mehta (Legoktm) 2013-11-14 01:06:44 UTC
Echo already provides $wgEchoBackend, and you can use ApiEchoNotifications::getNotifications to check a user's notifications. 

Right now there is no way to query a specific type of notification, is that the specific enhancement request being asked for?
Comment 3 bsitu 2013-11-14 01:21:03 UTC
The query actually has some problem for users with large volume of notifications.  Imagine a user has 500k notifications and the user has not received any thank notification, the query has to look through all 500k records to find the result.  Of course, in reality, most of the users wouldn't have that big number of notifications, I guess this is okay.  In theory, this query still has some potential risk.

Mobile shouldn't fire a query directly to Echo tables, I agree that the functionality should be abstracted in Echo or Thanks.  With that, we could also add some cache support, eg, storing the latest thanks in memcache.
Comment 4 Jon 2013-11-15 22:06:01 UTC
Agreed, mobile shouldn't fire this query directly to Echo and we should never push the existing code to production in the current state.

It does seem like a version of getNotifications that allows filtering is what is needed here despite the challenge in the implementation.

I would be keen to see such an abstraction.
Comment 5 spage 2013-11-19 07:59:27 UTC
The WMF core features team tracks this bug on Mingle card https://mingle.corp.wikimedia.org/projects/flow/cards/492, but people from the community are welcome to contribute here and in Gerrit.
Comment 6 Gerrit Notification Bot 2014-06-04 00:50:02 UTC
Change 137246 had a related patch set uploaded by Legoktm:
API: Allow user to specify what notification types they want or don't want

https://gerrit.wikimedia.org/r/137246
Comment 7 Gerrit Notification Bot 2014-08-14 01:14:45 UTC
Change 137246 abandoned by Legoktm:
API: Allow user to specify what notification types they want or don't want

Reason:
Doesn't really make sense after the notification type split I guess. I'm not really sure what direction CPB wanted to go, but it apparently wasn't important for them.

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links