mirror of
https://github.com/mastodon/mastodon.git
synced 2025-12-25 18:48:21 +00:00
Update grouped_notifications_presenter.rb
listened to cop
This commit is contained in:
parent
aa6b37bd07
commit
458c95b6ca
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user