Add grouped_types
parameter to allow clients to restrict which notifications types get grouped (#31594)
This commit is contained in:
parent
662f87dbe9
commit
ad0a28a8bf
5 changed files with 90 additions and 19 deletions
|
@ -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}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue