From 620855d77029989dda8e8563e9d020d6ced11af1 Mon Sep 17 00:00:00 2001 From: WMDE-Fisch Date: Wed, 3 May 2017 10:35:42 +0200 Subject: [PATCH] Fix counting of bundled mention notifications This patch will fix the notification counts in bundled mention notification messages. The former method did not work at all due to false assumptions what the getBundleCount method can be used for. Since this is in the presentation only wrong messages should be fixed when deployed Bug: T164115 Change-Id: If316549a090c2d281a8d612e4985fd556eabc807 --- includes/formatters/MentionStatusPresentationModel.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/formatters/MentionStatusPresentationModel.php b/includes/formatters/MentionStatusPresentationModel.php index 5b9c80887..c51a54c05 100644 --- a/includes/formatters/MentionStatusPresentationModel.php +++ b/includes/formatters/MentionStatusPresentationModel.php @@ -129,7 +129,8 @@ class EchoMentionStatusPresentationModel extends EchoEventPresentationModel { } private function getBundleSuccessCount() { - return $this->getBundleCount( false, [ $this, 'isMentionSuccessEvent' ] ); + $events = array_merge( $this->getBundledEvents(), [ $this->event ] ); + return count( array_filter( $events, [ $this, 'isMentionSuccessEvent' ] ) ); } private function isMixedBundle() {