20170203000003_do_not_import_onw_notifications_731.rb 646 B

123456789101112131415161718
  1. class DoNotImportOnwNotifications731 < ActiveRecord::Migration[4.2]
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.find_by(name: 'system_init_done')
  5. Setting.create_if_not_exists(
  6. title: 'Define postmaster filter.',
  7. name: '0014_postmaster_filter_own_notification_loop_detection',
  8. area: 'Postmaster::PreFilter',
  9. description: 'Define postmaster filter to check if email is a own created notification email, then ignore it to prevent email loops.',
  10. options: {},
  11. state: 'Channel::Filter::OwnNotificationLoopDetection',
  12. frontend: false
  13. )
  14. end
  15. end