1
0
Fork 0
forked from gitea/nas

Add grouped_types parameter to allow clients to restrict which notifications types get grouped (#31594)

This commit is contained in:
Claire 2024-08-29 14:39:07 +02:00 committed by GitHub
parent 662f87dbe9
commit ad0a28a8bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 90 additions and 19 deletions

View file

@ -237,7 +237,7 @@ class NotifyService < BaseService
private
def notification_group_key
return nil if @notification.filtered || %i(favourite reblog).exclude?(@notification.type)
return nil if @notification.filtered || Notification::GROUPABLE_NOTIFICATION_TYPES.exclude?(@notification.type)
type_prefix = "#{@notification.type}-#{@notification.target_status.id}"
redis_key = "notif-group/#{@recipient.id}/#{type_prefix}"