Thursday, June 04, 2026 2:13:11 AM
> notification_grouping.rb
# frozen_string_literal: true

module NotificationGrouping
  def territory_management_routes(routes)
    types = ESM::UserNotificationRoute::GROUPS[:territory_management]

    [
      "territory_management",
      routes.select { |route| types.include?(route.notification_type) }
    ]
  end

  def base_combat_routes(routes)
    types = ESM::UserNotificationRoute::GROUPS[:base_combat]

    [
      "base_combat",
      routes.select { |route| types.include?(route.notification_type) }
    ]
  end

  def economy_routes(routes)
    types = ESM::UserNotificationRoute::GROUPS[:economy]

    [
      "economy",
      routes.select { |route| types.include?(route.notification_type) }
    ]
  end

  def custom_routes(routes)
    types = ESM::UserNotificationRoute::GROUPS[:custom]

    [
      "custom",
      routes.select { |route| types.include?(route.notification_type) }
    ]
  end
end
All opinions represented herein are my own
- © 2024 - 2026 itsthedevman
- build 4294fb2