From f9cc5414d6c3c226a92f4175acdc340a2c712f85 Mon Sep 17 00:00:00 2001 From: Leif Battermann Date: Tue, 29 Oct 2024 09:47:30 +0000 Subject: [PATCH 1/4] send member welcome email after user created team --- .../src/Wire/EmailSubsystem.hs | 1 - .../src/Wire/EmailSubsystem/Interpreter.hs | 37 ------------------- .../src/Wire/EmailSubsystem/Template.hs | 10 +---- .../Wire/MockInterpreters/EmailSubsystem.hs | 1 - .../en/user/email/upgrade-subject.txt | 1 - .../brig/templates/en/user/email/upgrade.html | 1 - .../brig/templates/en/user/email/upgrade.txt | 22 ----------- services/brig/src/Brig/API/Public.hs | 2 +- services/brig/src/Brig/API/User.hs | 17 +++++---- services/brig/src/Brig/User/Template.hs | 8 ---- 10 files changed, 11 insertions(+), 89 deletions(-) delete mode 100644 services/brig/deb/opt/brig/templates/en/user/email/upgrade-subject.txt delete mode 100644 services/brig/deb/opt/brig/templates/en/user/email/upgrade.html delete mode 100644 services/brig/deb/opt/brig/templates/en/user/email/upgrade.txt diff --git a/libs/wire-subsystems/src/Wire/EmailSubsystem.hs b/libs/wire-subsystems/src/Wire/EmailSubsystem.hs index a8fa0f57b5e..f397bce9441 100644 --- a/libs/wire-subsystems/src/Wire/EmailSubsystem.hs +++ b/libs/wire-subsystems/src/Wire/EmailSubsystem.hs @@ -22,7 +22,6 @@ data EmailSubsystem m a where SendAccountDeletionEmail :: EmailAddress -> Name -> Code.Key -> Code.Value -> Locale -> EmailSubsystem m () SendTeamActivationMail :: EmailAddress -> Name -> ActivationKey -> ActivationCode -> Maybe Locale -> Text -> EmailSubsystem m () SendTeamDeletionVerificationMail :: EmailAddress -> Code.Value -> Maybe Locale -> EmailSubsystem m () - SendUpgradePersonalToTeamConfirmationEmail :: EmailAddress -> Name -> Text -> Locale -> EmailSubsystem m () -- | send invitation to an unknown email address. SendTeamInvitationMail :: EmailAddress -> TeamId -> EmailAddress -> InvitationCode -> Maybe Locale -> EmailSubsystem m Text -- | send invitation to an email address associated with a personal user account. diff --git a/libs/wire-subsystems/src/Wire/EmailSubsystem/Interpreter.hs b/libs/wire-subsystems/src/Wire/EmailSubsystem/Interpreter.hs index f3451750e47..ef03dadc7db 100644 --- a/libs/wire-subsystems/src/Wire/EmailSubsystem/Interpreter.hs +++ b/libs/wire-subsystems/src/Wire/EmailSubsystem/Interpreter.hs @@ -37,7 +37,6 @@ emailSubsystemInterpreter userTpls teamTpls branding = interpret \case SendTeamActivationMail email name key code mLocale teamName -> sendTeamActivationMailImpl userTpls branding email name key code mLocale teamName SendNewClientEmail email name client locale -> sendNewClientEmailImpl userTpls branding email name client locale SendAccountDeletionEmail email name key code locale -> sendAccountDeletionEmailImpl userTpls branding email name key code locale - SendUpgradePersonalToTeamConfirmationEmail email name teamName locale -> sendUpgradePersonalToTeamConfirmationEmailImpl userTpls branding email name teamName locale SendTeamInvitationMail email tid from code loc -> sendTeamInvitationMailImpl teamTpls branding email tid from code loc SendTeamInvitationMailPersonalUser email tid from code loc -> sendTeamInvitationMailPersonalUserImpl teamTpls branding email tid from code loc @@ -399,42 +398,6 @@ renderDeletionEmail email name cKey cValue DeletionEmailTemplate {..} branding = replace2 "code" = code replace2 x = x --------------------------------------------------------------------------------- --- Upgrade personal user to team owner confirmation email - -sendUpgradePersonalToTeamConfirmationEmailImpl :: - (Member EmailSending r) => - Localised UserTemplates -> - TemplateBranding -> - EmailAddress -> - Name -> - Text -> - Locale -> - Sem r () -sendUpgradePersonalToTeamConfirmationEmailImpl userTemplates branding email name teamName locale = do - let tpl = upgradePersonalToTeamEmail . snd $ forLocale (Just locale) userTemplates - sendMail $ renderUpgradePersonalToTeamConfirmationEmail email name teamName tpl branding - -renderUpgradePersonalToTeamConfirmationEmail :: EmailAddress -> Name -> Text -> UpgradePersonalToTeamEmailTemplate -> TemplateBranding -> Mail -renderUpgradePersonalToTeamConfirmationEmail email name _teamName UpgradePersonalToTeamEmailTemplate {..} branding = - (emptyMail from) - { mailTo = [to], - mailHeaders = - [ ("Subject", toStrict subj), - ("X-Zeta-Purpose", "Upgrade") - ], - mailParts = [[plainPart txt, htmlPart html]] - } - where - from = Address (Just upgradePersonalToTeamEmailSenderName) (fromEmail upgradePersonalToTeamEmailSender) - to = mkMimeAddress name email - txt = renderTextWithBranding upgradePersonalToTeamEmailBodyText replace1 branding - html = renderHtmlWithBranding upgradePersonalToTeamEmailBodyHtml replace1 branding - subj = renderTextWithBranding upgradePersonalToTeamEmailSubject replace1 branding - replace1 "email" = fromEmail email - replace1 "name" = fromName name - replace1 x = x - ------------------------------------------------------------------------------- -- Invitation Email diff --git a/libs/wire-subsystems/src/Wire/EmailSubsystem/Template.hs b/libs/wire-subsystems/src/Wire/EmailSubsystem/Template.hs index ea0339f74ca..da66555d680 100644 --- a/libs/wire-subsystems/src/Wire/EmailSubsystem/Template.hs +++ b/libs/wire-subsystems/src/Wire/EmailSubsystem/Template.hs @@ -85,7 +85,6 @@ data UserTemplates = UserTemplates loginCall :: LoginCallTemplate, deletionSms :: DeletionSmsTemplate, deletionEmail :: DeletionEmailTemplate, - upgradePersonalToTeamEmail :: UpgradePersonalToTeamEmailTemplate, newClientEmail :: NewClientEmailTemplate, verificationLoginEmail :: SecondFactorVerificationEmailTemplate, verificationScimTokenEmail :: SecondFactorVerificationEmailTemplate, @@ -138,14 +137,6 @@ data DeletionEmailTemplate = DeletionEmailTemplate deletionEmailSenderName :: Text } -data UpgradePersonalToTeamEmailTemplate = UpgradePersonalToTeamEmailTemplate - { upgradePersonalToTeamEmailSubject :: Template, - upgradePersonalToTeamEmailBodyText :: Template, - upgradePersonalToTeamEmailBodyHtml :: Template, - upgradePersonalToTeamEmailSender :: EmailAddress, - upgradePersonalToTeamEmailSenderName :: Text - } - data PasswordResetEmailTemplate = PasswordResetEmailTemplate { passwordResetEmailUrl :: Template, passwordResetEmailSubject :: Template, @@ -210,6 +201,7 @@ data CreatorWelcomeEmailTemplate = CreatorWelcomeEmailTemplate creatorWelcomeEmailSenderName :: !Text } +-- | Email template for welcoming a new member to a team or a personal user who created a team and became the owner. data MemberWelcomeEmailTemplate = MemberWelcomeEmailTemplate { memberWelcomeEmailUrl :: !Text, memberWelcomeEmailSubject :: !Template, diff --git a/libs/wire-subsystems/test/unit/Wire/MockInterpreters/EmailSubsystem.hs b/libs/wire-subsystems/test/unit/Wire/MockInterpreters/EmailSubsystem.hs index 636027753cd..ee8125d758e 100644 --- a/libs/wire-subsystems/test/unit/Wire/MockInterpreters/EmailSubsystem.hs +++ b/libs/wire-subsystems/test/unit/Wire/MockInterpreters/EmailSubsystem.hs @@ -36,6 +36,5 @@ noopEmailSubsystemInterpreter = interpret \case SendAccountDeletionEmail {} -> pure () SendTeamActivationMail {} -> pure () SendTeamDeletionVerificationMail {} -> pure () - SendUpgradePersonalToTeamConfirmationEmail {} -> pure () SendTeamInvitationMail {} -> pure "" SendTeamInvitationMailPersonalUser {} -> pure "" diff --git a/services/brig/deb/opt/brig/templates/en/user/email/upgrade-subject.txt b/services/brig/deb/opt/brig/templates/en/user/email/upgrade-subject.txt deleted file mode 100644 index 8a92b9f9a36..00000000000 --- a/services/brig/deb/opt/brig/templates/en/user/email/upgrade-subject.txt +++ /dev/null @@ -1 +0,0 @@ -Delete account? \ No newline at end of file diff --git a/services/brig/deb/opt/brig/templates/en/user/email/upgrade.html b/services/brig/deb/opt/brig/templates/en/user/email/upgrade.html deleted file mode 100644 index 690b0104fdd..00000000000 --- a/services/brig/deb/opt/brig/templates/en/user/email/upgrade.html +++ /dev/null @@ -1 +0,0 @@ -Delete account?

${brand_label_url}

Delete your account

We’ve received a request to delete your ${brand} account. Click the button below within 10 minutes to delete all your conversations, content and connections.

 
Delete account
 

If you can’t click the button, copy and paste this link to your browser:

${url}

If you didn’t request this, reset your password.

If you have any questions, please contact us.

                                                           
\ No newline at end of file diff --git a/services/brig/deb/opt/brig/templates/en/user/email/upgrade.txt b/services/brig/deb/opt/brig/templates/en/user/email/upgrade.txt deleted file mode 100644 index 744da7dc05c..00000000000 --- a/services/brig/deb/opt/brig/templates/en/user/email/upgrade.txt +++ /dev/null @@ -1,22 +0,0 @@ -[${brand_logo}] - -${brand_label_url} [${brand_url}] - -DELETE YOUR ACCOUNT -We’ve received a request to delete your ${brand} account. Click the button below -within 10 minutes to delete all your conversations, content and connections. - -Delete account [${url}]If you can’t click the button, copy and paste this link -to your browser: - -${url} - -If you didn’t request this, reset your password [${forgot}]. - -If you have any questions, please contact us [${support}]. - - --------------------------------------------------------------------------------- - -Privacy policy and terms of use [${legal}] · Report Misuse [${misuse}] -${copyright}. ALL RIGHTS RESERVED. \ No newline at end of file diff --git a/services/brig/src/Brig/API/Public.hs b/services/brig/src/Brig/API/Public.hs index aa83309f397..bbd88109a1a 100644 --- a/services/brig/src/Brig/API/Public.hs +++ b/services/brig/src/Brig/API/Public.hs @@ -726,7 +726,7 @@ createAccessToken method luid cid proof = do upgradePersonalToTeam :: ( Member (ConnectionStore InternalPaging) r, Member (Embed HttpClientIO) r, - Member EmailSubsystem r, + Member EmailSending r, Member GalleyAPIAccess r, Member (Input (Local ())) r, Member (Input UTCTime) r, diff --git a/services/brig/src/Brig/API/User.hs b/services/brig/src/Brig/API/User.hs index e081822b271..b826a19e8c5 100644 --- a/services/brig/src/Brig/API/User.hs +++ b/services/brig/src/Brig/API/User.hs @@ -83,6 +83,7 @@ import Brig.Effects.UserPendingActivationStore (UserPendingActivation (..), User import Brig.Effects.UserPendingActivationStore qualified as UserPendingActivationStore import Brig.IO.Intra qualified as Intra import Brig.Options hiding (internalEvents) +import Brig.Team.Email (sendMemberWelcomeMail) import Brig.Types.Activation (ActivationPair) import Brig.Types.Intra import Brig.User.Auth.Cookie qualified as Auth @@ -132,6 +133,7 @@ import Wire.ActivationCodeStore qualified as ActivationCode import Wire.AuthenticationSubsystem (AuthenticationSubsystem, internalLookupPasswordResetCode) import Wire.BlockListStore as BlockListStore import Wire.DeleteQueue +import Wire.EmailSending (EmailSending) import Wire.EmailSubsystem import Wire.Error import Wire.Events (Events) @@ -258,7 +260,6 @@ createUserSpar new = do upgradePersonalToTeam :: forall r. ( Member GalleyAPIAccess r, - Member EmailSubsystem r, Member UserStore r, Member UserSubsystem r, Member TinyLog r, @@ -266,7 +267,8 @@ upgradePersonalToTeam :: Member NotificationSubsystem r, Member (Input (Local ())) r, Member (Input UTCTime) r, - Member (ConnectionStore InternalPaging) r + Member (ConnectionStore InternalPaging) r, + Member EmailSending r ) => Local UserId -> BindingNewTeamUser -> @@ -298,12 +300,11 @@ upgradePersonalToTeam luid bNewTeam = do -- send confirmation email for_ (userEmail user) $ \email -> do - liftSem $ - sendUpgradePersonalToTeamConfirmationEmail - email - user.userDisplayName - bNewTeam.bnuTeam.newTeamName.fromRange - user.userLocale + sendMemberWelcomeMail + email + tid + bNewTeam.bnuTeam.newTeamName.fromRange + (Just user.userLocale) pure $! createUserTeam diff --git a/services/brig/src/Brig/User/Template.hs b/services/brig/src/Brig/User/Template.hs index 36436027782..110d979bc80 100644 --- a/services/brig/src/Brig/User/Template.hs +++ b/services/brig/src/Brig/User/Template.hs @@ -28,7 +28,6 @@ module Brig.User.Template LoginCallTemplate (..), DeletionSmsTemplate (..), DeletionEmailTemplate (..), - UpgradePersonalToTeamEmailTemplate (..), NewClientEmailTemplate (..), SecondFactorVerificationEmailTemplate (..), loadUserTemplates, @@ -110,13 +109,6 @@ loadUserTemplates o = readLocalesDir defLocale templateDir "user" $ \fp -> <*> pure emailSender <*> readText fp "email/sender.txt" ) - <*> ( UpgradePersonalToTeamEmailTemplate - <$> readTemplate fp "email/upgrade-subject.txt" - <*> readTemplate fp "email/upgrade.txt" - <*> readTemplate fp "email/upgrade.html" - <*> pure emailSender - <*> readText fp "email/sender.txt" - ) <*> ( NewClientEmailTemplate <$> readTemplate fp "email/new-client-subject.txt" <*> readTemplate fp "email/new-client.txt" From 23c16b8d8d7eba4a4f00a444afdc63110bab0fb8 Mon Sep 17 00:00:00 2001 From: Leif Battermann Date: Tue, 29 Oct 2024 09:50:38 +0000 Subject: [PATCH 2/4] fix old changelog --- changelog.d/2-features/WPB-10658 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/2-features/WPB-10658 b/changelog.d/2-features/WPB-10658 index b8eff34863d..c7316e48404 100644 --- a/changelog.d/2-features/WPB-10658 +++ b/changelog.d/2-features/WPB-10658 @@ -1 +1 @@ -Allow an existing non-team user to migrate to a team (#4229, ##) +Allow an existing non-team user to migrate to a team (#4229, #4268) From 954fea15018a41838f88b04fd7229d48a27211ad Mon Sep 17 00:00:00 2001 From: Leif Battermann Date: Tue, 29 Oct 2024 13:46:58 +0000 Subject: [PATCH 3/4] implement welcome email templates handling (no templates yet) --- .../src/Wire/EmailSubsystem/Template.hs | 23 +++++++++- services/brig/src/Brig/API/Public.hs | 1 - services/brig/src/Brig/API/User.hs | 8 ++-- services/brig/src/Brig/Team/Email.hs | 42 ++++++++----------- services/brig/src/Brig/Team/Template.hs | 16 +++++++ 5 files changed, 57 insertions(+), 33 deletions(-) diff --git a/libs/wire-subsystems/src/Wire/EmailSubsystem/Template.hs b/libs/wire-subsystems/src/Wire/EmailSubsystem/Template.hs index da66555d680..ca79185fccc 100644 --- a/libs/wire-subsystems/src/Wire/EmailSubsystem/Template.hs +++ b/libs/wire-subsystems/src/Wire/EmailSubsystem/Template.hs @@ -201,7 +201,6 @@ data CreatorWelcomeEmailTemplate = CreatorWelcomeEmailTemplate creatorWelcomeEmailSenderName :: !Text } --- | Email template for welcoming a new member to a team or a personal user who created a team and became the owner. data MemberWelcomeEmailTemplate = MemberWelcomeEmailTemplate { memberWelcomeEmailUrl :: !Text, memberWelcomeEmailSubject :: !Template, @@ -211,9 +210,29 @@ data MemberWelcomeEmailTemplate = MemberWelcomeEmailTemplate memberWelcomeEmailSenderName :: !Text } +data PersonalUserMemberWelcomeEmailTemplate = PersonalUserMemberWelcomeEmailTemplate + { personalUserMemberWelcomeEmailUrl :: !Text, + personalUserMemberWelcomeEmailSubject :: !Template, + personalUserMemberWelcomeEmailBodyText :: !Template, + personalUserMemberWelcomeEmailBodyHtml :: !Template, + personalUserMemberWelcomeEmailSender :: !EmailAddress, + personalUserMemberWelcomeEmailSenderName :: !Text + } + +data PersonalUserCreatorWelcomeEmailTemplate = PersonalUserCreatorWelcomeEmailTemplate + { personalUserCreatorWelcomeEmailUrl :: !Text, + personalUserCreatorWelcomeEmailSubject :: !Template, + personalUserCreatorWelcomeEmailBodyText :: !Template, + personalUserCreatorWelcomeEmailBodyHtml :: !Template, + personalUserCreatorWelcomeEmailSender :: !EmailAddress, + personalUserCreatorWelcomeEmailSenderName :: !Text + } + data TeamTemplates = TeamTemplates { invitationEmail :: !InvitationEmailTemplate, existingUserInvitationEmail :: !InvitationEmailTemplate, creatorWelcomeEmail :: !CreatorWelcomeEmailTemplate, - memberWelcomeEmail :: !MemberWelcomeEmailTemplate + memberWelcomeEmail :: !MemberWelcomeEmailTemplate, + personalUserMemberWelcomeEmail :: !PersonalUserMemberWelcomeEmailTemplate, + personalUserCreatorWelcomeEmail :: !PersonalUserCreatorWelcomeEmailTemplate } diff --git a/services/brig/src/Brig/API/Public.hs b/services/brig/src/Brig/API/Public.hs index bbd88109a1a..42d0b5c2a7a 100644 --- a/services/brig/src/Brig/API/Public.hs +++ b/services/brig/src/Brig/API/Public.hs @@ -726,7 +726,6 @@ createAccessToken method luid cid proof = do upgradePersonalToTeam :: ( Member (ConnectionStore InternalPaging) r, Member (Embed HttpClientIO) r, - Member EmailSending r, Member GalleyAPIAccess r, Member (Input (Local ())) r, Member (Input UTCTime) r, diff --git a/services/brig/src/Brig/API/User.hs b/services/brig/src/Brig/API/User.hs index b826a19e8c5..46c3e658e30 100644 --- a/services/brig/src/Brig/API/User.hs +++ b/services/brig/src/Brig/API/User.hs @@ -83,7 +83,7 @@ import Brig.Effects.UserPendingActivationStore (UserPendingActivation (..), User import Brig.Effects.UserPendingActivationStore qualified as UserPendingActivationStore import Brig.IO.Intra qualified as Intra import Brig.Options hiding (internalEvents) -import Brig.Team.Email (sendMemberWelcomeMail) +import Brig.Team.Email import Brig.Types.Activation (ActivationPair) import Brig.Types.Intra import Brig.User.Auth.Cookie qualified as Auth @@ -133,7 +133,6 @@ import Wire.ActivationCodeStore qualified as ActivationCode import Wire.AuthenticationSubsystem (AuthenticationSubsystem, internalLookupPasswordResetCode) import Wire.BlockListStore as BlockListStore import Wire.DeleteQueue -import Wire.EmailSending (EmailSending) import Wire.EmailSubsystem import Wire.Error import Wire.Events (Events) @@ -267,8 +266,7 @@ upgradePersonalToTeam :: Member NotificationSubsystem r, Member (Input (Local ())) r, Member (Input UTCTime) r, - Member (ConnectionStore InternalPaging) r, - Member EmailSending r + Member (ConnectionStore InternalPaging) r ) => Local UserId -> BindingNewTeamUser -> @@ -300,7 +298,7 @@ upgradePersonalToTeam luid bNewTeam = do -- send confirmation email for_ (userEmail user) $ \email -> do - sendMemberWelcomeMail + sendPersonalUserCreatorWelcomeMail email tid bNewTeam.bnuTeam.newTeamName.fromRange diff --git a/services/brig/src/Brig/Team/Email.hs b/services/brig/src/Brig/Team/Email.hs index e6d0cdaeb7f..441cee5d7bf 100644 --- a/services/brig/src/Brig/Team/Email.hs +++ b/services/brig/src/Brig/Team/Email.hs @@ -18,9 +18,9 @@ -- with this program. If not, see . module Brig.Team.Email - ( CreatorWelcomeEmail (..), - MemberWelcomeEmail (..), - sendMemberWelcomeMail, + ( sendMemberWelcomeMail, + sendPersonalUserMemberWelcomeMail, + sendPersonalUserCreatorWelcomeMail, ) where @@ -33,35 +33,27 @@ import Network.Mail.Mime import Polysemy import Wire.API.User import Wire.EmailSending -import Wire.EmailSubsystem.Template (TemplateBranding, renderHtmlWithBranding, renderTextWithBranding) +import Wire.EmailSubsystem.Template sendMemberWelcomeMail :: (Member EmailSending r) => EmailAddress -> TeamId -> Text -> Maybe Locale -> (AppT r) () sendMemberWelcomeMail to tid teamName loc = do tpl <- memberWelcomeEmail . snd <$> teamTemplatesWithLocale loc branding <- asks (.templateBranding) - let mail = MemberWelcomeEmail to tid teamName - liftSem $ sendMail $ renderMemberWelcomeMail mail tpl branding + liftSem $ sendMail $ renderMemberWelcomeMail to tid teamName tpl branding -------------------------------------------------------------------------------- --- Creator Welcome Email +sendPersonalUserMemberWelcomeMail :: EmailAddress -> TeamId -> Text -> Maybe Locale -> (AppT r) () +sendPersonalUserMemberWelcomeMail _ _ _ _ = do + pure () -data CreatorWelcomeEmail = CreatorWelcomeEmail - { cwTo :: !EmailAddress, - cwTid :: !TeamId, - cwTeamName :: !Text - } +sendPersonalUserCreatorWelcomeMail :: EmailAddress -> TeamId -> Text -> Maybe Locale -> (AppT r) () +sendPersonalUserCreatorWelcomeMail _ _ _ _ = do + pure () ------------------------------------------------------------------------------- -- Member Welcome Email -data MemberWelcomeEmail = MemberWelcomeEmail - { mwTo :: !EmailAddress, - mwTid :: !TeamId, - mwTeamName :: !Text - } - -renderMemberWelcomeMail :: MemberWelcomeEmail -> MemberWelcomeEmailTemplate -> TemplateBranding -> Mail -renderMemberWelcomeMail MemberWelcomeEmail {..} MemberWelcomeEmailTemplate {..} branding = +renderMemberWelcomeMail :: EmailAddress -> TeamId -> Text -> MemberWelcomeEmailTemplate -> TemplateBranding -> Mail +renderMemberWelcomeMail emailTo tid teamName MemberWelcomeEmailTemplate {..} branding = (emptyMail from) { mailTo = [to], mailHeaders = @@ -72,12 +64,12 @@ renderMemberWelcomeMail MemberWelcomeEmail {..} MemberWelcomeEmailTemplate {..} } where from = Address (Just memberWelcomeEmailSenderName) (fromEmail memberWelcomeEmailSender) - to = Address Nothing (fromEmail mwTo) + to = Address Nothing (fromEmail emailTo) txt = renderTextWithBranding memberWelcomeEmailBodyText replace branding html = renderHtmlWithBranding memberWelcomeEmailBodyHtml replace branding subj = renderTextWithBranding memberWelcomeEmailSubject replace branding replace "url" = memberWelcomeEmailUrl - replace "email" = fromEmail mwTo - replace "team_id" = idToText mwTid - replace "team_name" = mwTeamName + replace "email" = fromEmail emailTo + replace "team_id" = idToText tid + replace "team_name" = teamName replace x = x diff --git a/services/brig/src/Brig/Team/Template.hs b/services/brig/src/Brig/Team/Template.hs index a63cba25fb0..86c409e9f62 100644 --- a/services/brig/src/Brig/Team/Template.hs +++ b/services/brig/src/Brig/Team/Template.hs @@ -63,6 +63,22 @@ loadTeamTemplates o = readLocalesDir defLocale (templateDir gOptions) "team" $ \ <*> pure (emailSender gOptions) <*> readText fp "email/sender.txt" ) + <*> ( PersonalUserMemberWelcomeEmailTemplate + "" + (template "") + (template "") + (template "") + (emailSender gOptions) + <$> readText fp "email/sender.txt" + ) + <*> ( PersonalUserCreatorWelcomeEmailTemplate + "" + (template "") + (template "") + (template "") + (emailSender gOptions) + <$> readText fp "email/sender.txt" + ) where gOptions = o.emailSMS.general tOptions = o.emailSMS.team From 1567937e9d38e12e232888bad06b5ee189ba7f02 Mon Sep 17 00:00:00 2001 From: Leif Battermann Date: Tue, 29 Oct 2024 13:48:56 +0000 Subject: [PATCH 4/4] changelog --- changelog.d/2-features/WPB-10658 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/2-features/WPB-10658 b/changelog.d/2-features/WPB-10658 index c7316e48404..47da7fbabb8 100644 --- a/changelog.d/2-features/WPB-10658 +++ b/changelog.d/2-features/WPB-10658 @@ -1 +1 @@ -Allow an existing non-team user to migrate to a team (#4229, #4268) +Allow an existing non-team user to migrate to a team (#4229, #4268, #4315)