Merge commit 'cfb473c204' into upstream-20250228

This commit is contained in:
KMY 2025-02-28 11:07:08 +09:00
commit 795561f5a7
78 changed files with 1684 additions and 1081 deletions

View file

@ -7,6 +7,10 @@ module Notification::Groups
GROUPABLE_NOTIFICATION_TYPES = %i(favourite reblog follow emoji_reaction).freeze
MAXIMUM_GROUP_SPAN_HOURS = 12
included do
scope :by_group_key, ->(group_key) { group_key&.start_with?('ungrouped-') ? where(id: group_key.delete_prefix('ungrouped-')) : where(group_key: group_key) }
end
def set_group_key!
return if filtered? || GROUPABLE_NOTIFICATION_TYPES.exclude?(type)