1
0
Fork 0
mirror of synced 2024-06-02 19:04:49 +12:00

Merge pull request #889 from TorstenDittmann/fix-team-email

fix(teams): invitation email
This commit is contained in:
Eldad A. Fux 2021-02-09 14:40:56 +02:00 committed by GitHub
commit b964265365
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -406,11 +406,12 @@ App::post('/v1/teams/:teamId/memberships')
$body = new Template(__DIR__.'/../../config/locale/templates/email-base.tpl');
$content = new Template(__DIR__.'/../../config/locale/translations/templates/'.$locale->getText('account.emails.invitation.body'));
$cta = new Template(__DIR__.'/../../config/locale/templates/email-cta.tpl');
$title = \sprintf($locale->getText('account.emails.invitation.title'), $team->getAttribute('name', '[TEAM-NAME]'), $project->getAttribute('name', ['[APP-NAME]']));
$body
->setParam('{{content}}', $content->render())
->setParam('{{cta}}', $cta->render())
->setParam('{{title}}', $locale->getText('account.emails.invitation.title'))
->setParam('{{title}}', $title)
->setParam('{{direction}}', $locale->getText('settings.direction'))
->setParam('{{project}}', $project->getAttribute('name', ['[APP-NAME]']))
->setParam('{{team}}', $team->getAttribute('name', '[TEAM-NAME]'))
@ -430,9 +431,9 @@ App::post('/v1/teams/:teamId/memberships')
->setParam('from', ($project->getId() === 'console') ? '' : \sprintf($locale->getText('account.emails.team'), $project->getAttribute('name')))
->setParam('recipient', $email)
->setParam('name', $name)
->setParam('subject', \sprintf($locale->getText('account.emails.invitation.title'), $team->getAttribute('name', '[TEAM-NAME]'), $project->getAttribute('name', ['[APP-NAME]'])))
->setParam('subject', $title)
->setParam('body', $body->render())
->trigger();
->trigger()
;
}