Skip to content

Commit

Permalink
add subdomain support to the email modal
Browse files Browse the repository at this point in the history
  • Loading branch information
auumgn committed Dec 16, 2024
1 parent 51589eb commit a8f71da
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,9 @@ export class ModalEmailComponent implements OnInit, OnDestroy {

if (domain) {
const remainingEmailsHaveDomain = this.emails.find((email) =>
email ? email.verified && email.value.split('@')[1] === domain : false
email
? email.verified && email.value.split('@')[1].endsWith(domain)
: false
)
if (!remainingEmailsHaveDomain) {
this.verifiedDomains = this.verifiedDomains.filter(
Expand Down Expand Up @@ -579,7 +581,7 @@ export class ModalEmailComponent implements OnInit, OnDestroy {
if (controlKey.startsWith('emailInput')) {
const control = this.emailsForm.get(controlKey).value

if (control.email.split('@')[1] === domain) {
if (control.email.split('@')[1].endsWith(domain)) {
visibilities.push(control.visibility)
}
}
Expand Down Expand Up @@ -612,7 +614,7 @@ export class ModalEmailComponent implements OnInit, OnDestroy {
Object.keys(this.emailsForm.controls).forEach((controlKey) => {
if (controlKey.startsWith('emailInput')) {
const control = this.emailsForm.get(controlKey)
if (control.value.email.split('@')[1] === domain) {
if (control.value.email.split('@')[1].endsWith(domain)) {
if (this.isEmailVerified(control.value.email)) {
visibilities.push(control.value.visibility)
}
Expand Down

0 comments on commit a8f71da

Please sign in to comment.