Fix exclude status reference in tootle

This commit is contained in:
noellabo 2022-03-18 15:12:21 +09:00
parent 999e361892
commit 4e41bbb9b7

View file

@ -75,7 +75,7 @@ class Api::V1::NotificationsController < Api::BaseController
def exclude_types def exclude_types
val = params.permit(exclude_types: [])[:exclude_types] || [] val = params.permit(exclude_types: [])[:exclude_types] || []
val = [val] unless val.is_a?(Enumerable) val = [val] unless val.is_a?(Enumerable)
val = val << 'emoji_reaction' << 'status' unless new_notification_type_compatible? val = val << 'emoji_reaction' << 'status' << 'status_reference' << 'scheduled_status' unless new_notification_type_compatible?
val = val << 'emoji_reaction' unless current_user&.setting_enable_reaction val = val << 'emoji_reaction' unless current_user&.setting_enable_reaction
val = val << 'status_reference' unless current_user&.setting_enable_status_reference val = val << 'status_reference' unless current_user&.setting_enable_status_reference
val.uniq val.uniq