Allow unblocking email addresses from any matching account (#29305)

This commit is contained in:
Claire authored and GitHub committed 2024-03-20 14:38:00 +00:00
1 parent 0a33be39c1
commit 8a1423a474
4 files changed
+4 -3

No files matched your search

+1
View File
@@ -20,6 +20,7 @@ class CanonicalEmailBlock < ApplicationRecord
validates :canonical_email_hash, presence: true, uniqueness: true
scope :matching_email, ->(email) { where(canonical_email_hash: email_to_canonical_email_hash(email)) }
scope :matching_account, ->(account) { matching_email(account&.user_email).or(where(reference_account: account)) }
def to_log_human_identifier
canonical_email_hash