From f1c708ef9e5fb1f71ca526caeebcb486bf24af00 Mon Sep 17 00:00:00 2001 From: Matthias Mullie Date: Fri, 1 Apr 2016 13:33:05 +0000 Subject: [PATCH] Make foreign NotificationGroupItems aware of their section This caused notifications on mobile to show notifications for both alert|message, as the type was always "all". Bug: T130801 Change-Id: Ice245eb407ca360d8e882c0ba48cb7b3e0ecb851 --- includes/api/ApiEchoNotifications.php | 1 + modules/viewmodel/mw.echo.dm.NotificationsModel.js | 1 + 2 files changed, 2 insertions(+) diff --git a/includes/api/ApiEchoNotifications.php b/includes/api/ApiEchoNotifications.php index 15f42f8f6..c4ed7bf5e 100644 --- a/includes/api/ApiEchoNotifications.php +++ b/includes/api/ApiEchoNotifications.php @@ -313,6 +313,7 @@ class ApiEchoNotifications extends ApiQueryBase { $output = EchoDataOutputFormatter::formatOutput( $notif, $format, $user, $this->getLanguage() ); // Add cross-wiki-specific data + $output['section'] = $section; $output['count'] = $count; $output['sources'] = $foreignNotifications->getApiEndpoints( $wikis ); // Add timestamp information diff --git a/modules/viewmodel/mw.echo.dm.NotificationsModel.js b/modules/viewmodel/mw.echo.dm.NotificationsModel.js index 4048393a1..17490be31 100644 --- a/modules/viewmodel/mw.echo.dm.NotificationsModel.js +++ b/modules/viewmodel/mw.echo.dm.NotificationsModel.js @@ -532,6 +532,7 @@ // For bundles that are not foreign (like regular // bundles of notifications) this flag should be false foreign: true, + type: notifData.section, count: notifData.count } ) );