Skip to content

Commit

Permalink
fix: verification flow
Browse files Browse the repository at this point in the history
  • Loading branch information
scmmishra committed Jan 24, 2025
1 parent 4ab9cde commit f816ba4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 1 addition & 5 deletions app/models/domain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ def drop_identity
ses_service.delete_identity
end

def is_verifying
status_success? && dkim_status_success? && spf_status_success?
end

def self.is_unique(name, newsletter_id)
Domain.where(
name: name,
Expand All @@ -72,7 +68,7 @@ def self.is_unique(name, newsletter_id)

def verify
sync_attributes
is_verifying
verified?
end

private
Expand Down
4 changes: 4 additions & 0 deletions app/models/newsletter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ def description_html
Kramdown::Document.new(description).to_html.html_safe
end

def verify_custom_domain
sending_domain&.verify
end

def ses_verified?
sending_domain&.verified?
end
Expand Down

0 comments on commit f816ba4

Please sign in to comment.