thunderbird: fix aliases SMTP configuration not being listed as usable

Signed-off-by: tsrk. <tsrk@tsrk.me>
(cherry picked from commit d441981b20)
This commit is contained in:
tsrk. 2025-12-03 16:28:02 +01:00 committed by Austin Horstman
parent e1680d594a
commit f63d0fe9d8
3 changed files with 11 additions and 3 deletions

View file

@ -9,6 +9,7 @@ let
attrValues
concatStringsSep
filter
flatten
length
literalExpression
mapAttrsToList
@ -918,7 +919,14 @@ in
calendarAccounts = getAccountsForProfile name enabledCalendarAccountsWithId;
contactAccounts = getAccountsForProfile name enabledContactAccountsWithId;
smtp = filter (a: a.smtp != null) emailAccounts;
accountsSmtp = filter (a: a.smtp != null) emailAccounts;
aliasesSmtp =
let
getAliasesWithSmtp = a: filter (al: builtins.isAttrs al && al.smtp != null) a.aliases;
getAliasesWithId = a: map (al: al // { id = getId a al; }) (getAliasesWithSmtp a);
in
flatten (map getAliasesWithId emailAccounts);
smtp = accountsSmtp ++ aliasesSmtp;
feedAccounts = addId (attrValues profile.feedAccounts);