mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 00:42:04 +02:00
Add check for bounce presence in #failed? method of verification
This commit is contained in:
parent
9f54b1e8a9
commit
e843b7293b
2 changed files with 14 additions and 1 deletions
|
@ -34,13 +34,17 @@ class EmailAddressVerification < ApplicationRecord
|
|||
end
|
||||
|
||||
def failed?
|
||||
verified_at.present? && !success
|
||||
bounce_present? || (verified_at.present? && !success)
|
||||
end
|
||||
|
||||
def verified?
|
||||
success
|
||||
end
|
||||
|
||||
def bounce_present?
|
||||
BouncedMailAddress.find_by(email: email).present?
|
||||
end
|
||||
|
||||
def check_force_delete
|
||||
return unless failed?
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue