From 458c95b6caae17e70da3e77dfdcf7db5526e97da Mon Sep 17 00:00:00 2001 From: Shlee Date: Tue, 23 Dec 2025 01:09:11 +1030 Subject: [PATCH] Update grouped_notifications_presenter.rb listened to cop --- app/presenters/grouped_notifications_presenter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/presenters/grouped_notifications_presenter.rb b/app/presenters/grouped_notifications_presenter.rb index fefda89cab0..6ab6ffc818b 100644 --- a/app/presenters/grouped_notifications_presenter.rb +++ b/app/presenters/grouped_notifications_presenter.rb @@ -19,7 +19,7 @@ class GroupedNotificationsPresenter < ActiveModelSerializers::Model def accounts @accounts ||= begin if partial_avatars? - @grouped_notifications.map { |group| group.sample_accounts.first }.compact.uniq(&:id) + @grouped_notifications.filter_map { |group| group.sample_accounts.first }.uniq(&:id) else @grouped_notifications.flat_map(&:sample_accounts).compact.uniq(&:id) end