mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 01:11:43 +02:00
Merge pull request #1166 from internetee/refactor-domain-mailer
Refactor domain mailer
This commit is contained in:
commit
718bcbcea6
21 changed files with 175 additions and 108 deletions
|
@ -167,7 +167,7 @@ class Domain < ActiveRecord::Base
|
|||
errors.add(:statuses, :taken)
|
||||
end
|
||||
|
||||
attr_accessor :registrant_typeahead, :update_me, :deliver_emails,
|
||||
attr_accessor :registrant_typeahead, :update_me,
|
||||
:epp_pending_update, :epp_pending_delete, :reserved_pw
|
||||
|
||||
def subordinate_nameservers
|
||||
|
|
|
@ -19,7 +19,7 @@ class DomainCron
|
|||
RegistrantChangeExpiredEmailJob.enqueue(domain.id)
|
||||
end
|
||||
if domain.pending_delete? || domain.pending_delete_confirmation?
|
||||
DomainMailer.pending_delete_expired_notification(domain.id, true).deliver
|
||||
DomainDeleteMailer.expired(domain).deliver_now
|
||||
end
|
||||
|
||||
domain.preclean_pendings
|
||||
|
|
|
@ -483,8 +483,6 @@ class Epp::Domain < Domain
|
|||
registrant_verification_asked!(frame.to_s, current_user.id)
|
||||
end
|
||||
|
||||
self.deliver_emails = true # turn on email delivery for epp
|
||||
|
||||
errors.empty? && super(at)
|
||||
end
|
||||
|
||||
|
@ -511,7 +509,7 @@ class Epp::Domain < Domain
|
|||
preclean_pendings
|
||||
statuses.delete(DomainStatus::PENDING_DELETE_CONFIRMATION)
|
||||
statuses.delete(DomainStatus::PENDING_DELETE)
|
||||
DomainMailer.delete_confirmation(id, deliver_emails).deliver
|
||||
DomainDeleteMailer.accepted(self).deliver_now
|
||||
clean_pendings!
|
||||
set_pending_delete!
|
||||
true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue