chore(news): Bailey

also conclude email A/B testing
This commit is contained in:
Sabe Jones
2019-04-18 14:15:28 -05:00
parent c91de90fff
commit f16e0bd044
9 changed files with 20 additions and 44 deletions

View File

@@ -184,8 +184,8 @@ async function registerLocal (req, res, { isV3 = false }) {
.remove({email: savedUser.auth.local.email})
.then(() => {
if (existingUser) return;
if (savedUser._ABtests && savedUser._ABtests.welcomeEmailSplit) {
sendTxnEmail(savedUser, savedUser._ABtests.welcomeEmailSplit);
if (newUser.registeredThrough === 'habitica-web') {
sendTxnEmail(savedUser, 'welcome-v2b');
} else {
sendTxnEmail(savedUser, 'welcome');
}