mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 16:02:03 +02:00
fix poll message spam after validation email
This commit is contained in:
parent
9ba7af504a
commit
e320a7ced1
3 changed files with 29 additions and 16 deletions
|
@ -6,18 +6,26 @@ module Domains
|
|||
end
|
||||
|
||||
def notify_without_email
|
||||
domain.registrar.notifications.create!(text: I18n.t('force_delete_set_on_domain',
|
||||
domain_name: domain.name,
|
||||
outzone_date: domain.outzone_date,
|
||||
purge_date: domain.purge_date))
|
||||
template = I18n.t('force_delete_set_on_domain',
|
||||
domain_name: domain.name,
|
||||
outzone_date: domain.outzone_date,
|
||||
purge_date: domain.purge_date)
|
||||
|
||||
return if domain.registrar.notifications.last.text.include? template
|
||||
|
||||
domain.registrar.notifications.create!(text: template)
|
||||
end
|
||||
|
||||
def notify_with_email
|
||||
domain.registrar.notifications.create!(text: I18n.t('force_delete_auto_email',
|
||||
domain_name: domain.name,
|
||||
outzone_date: domain.outzone_date,
|
||||
purge_date: domain.purge_date,
|
||||
email: email))
|
||||
template = I18n.t('force_delete_auto_email',
|
||||
domain_name: domain.name,
|
||||
outzone_date: domain.outzone_date,
|
||||
purge_date: domain.purge_date,
|
||||
email: email)
|
||||
|
||||
return if domain.registrar.notifications.last.text.include? template
|
||||
|
||||
domain.registrar.notifications.create!(text: template)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue