small adjustments #1

Merged
lauri merged 3 commits from dev into master 2023-08-04 05:54:15 +00:00
2 changed files with 5 additions and 2 deletions
Showing only changes of commit f2ded792c5 - Show all commits

View File

@ -12,6 +12,7 @@
"wildDuck": { "wildDuck": {
"url": "http://localhost", "url": "http://localhost",
"token": "aaaaa", "token": "aaaaa",
"domain": "test-codemowers.eu" "domain": "test-codemowers.eu",
"preferredDomain": "k-space.ee"
} }
} }

View File

@ -93,7 +93,9 @@ export class AliasesService<ServiceParams extends AliasesParams = AliasesParams>
const emails = params.session?.user?.emails; const emails = params.session?.user?.emails;
const addressInfoResponse = await Promise.any( const addressInfoResponse = await Promise.any(
emails.map((email: string) => emails
.filter((email: string) => email.endsWith(config.get("wildDuck.preferredDomain")))
.map((email: string) =>
wildDuckClient.get<Alias>(`addresses/resolve/${email}`), wildDuckClient.get<Alias>(`addresses/resolve/${email}`),
), ),
); );