mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 01:30:15 +00:00
Don't list foreign notifications for both sections when not using groupbysection
API requests with notgroupbysection disabled but notsection set to 'alert' would return foreign notification bundles for both alerts and messages, separately. The frontend always pasess notgroupbysection=1 in practice because notmessageunreadfirst=1 doesn't work without it; but regardless of that, the API module shouldn't return a foreign notification bundle for messages when only alerts are requested. Change-Id: I9fa6d1411a8c121591ce6dd75ee8052bcdcb478b
This commit is contained in:
parent
22fa76dabe
commit
20f091982c
|
@ -70,7 +70,7 @@ class ApiEchoNotifications extends ApiQueryBase {
|
|||
|
||||
if ( $foreignNotifications ) {
|
||||
// insert fake notifications for foreign notifications
|
||||
foreach ( EchoAttributeManager::$sections as $i => $section ) {
|
||||
foreach ( $params['sections'] as $i => $section ) {
|
||||
if ( $foreignNotifications->getCount( $section ) > 0 ) {
|
||||
$result['list'][-$i-1] = $this->makeForeignNotification( $user, $params['format'], $foreignNotifications, $section );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue