mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Handle social auth in A/B testing (#8024)
* fix(AB-testing): handle social auth * refactor(AB-testing): move to pre save hooks
This commit is contained in:
committed by
Matteo Pagliazzi
parent
81b7eeeb71
commit
86c9bddc09
@@ -130,14 +130,6 @@ api.registerLocal = {
|
||||
newUser.registeredThrough = req.headers['x-client']; // Not saved, used to create the correct tasks based on the device used
|
||||
}
|
||||
|
||||
// A/B Test 2016-09-12: Start with Sound Enabled?
|
||||
if (Math.random() < 0.5) {
|
||||
newUser.preferences.sound = 'rosstavoTheme';
|
||||
newUser._ABtest = '20160912-soundEnabled';
|
||||
} else {
|
||||
newUser._ABtest = '20160912-soundDisabled';
|
||||
}
|
||||
|
||||
// we check for partyInvite for backward compatibility
|
||||
if (req.query.groupInvite || req.query.partyInvite) {
|
||||
await _handleGroupInvitation(newUser, req.query.groupInvite || req.query.partyInvite);
|
||||
|
||||
Reference in New Issue
Block a user