mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
fix(onboarding): remove start date restriction
This commit is contained in:
@@ -1,12 +1,3 @@
|
||||
import moment from 'moment';
|
||||
|
||||
const BEGIN_DATE = moment('2019-12-18');
|
||||
|
||||
// Only users that signed up after the BEGIN DATE should see the onboarding
|
||||
export function hasActiveOnboarding (user) {
|
||||
return BEGIN_DATE.isBefore(user.auth.timestamps.created);
|
||||
}
|
||||
|
||||
export function hasCompletedOnboarding (user) {
|
||||
return (
|
||||
user.achievements.createdTask === true
|
||||
@@ -24,7 +15,7 @@ export function onOnboardingComplete (user) {
|
||||
|
||||
// Add notification and awards (server)
|
||||
export function checkOnboardingStatus (user, req, analytics) {
|
||||
if (hasActiveOnboarding(user) && hasCompletedOnboarding(user) && user.addNotification) {
|
||||
if (hasCompletedOnboarding(user) && user.addNotification) {
|
||||
user.addNotification('ONBOARDING_COMPLETE');
|
||||
if (analytics) {
|
||||
analytics.track('onboarding complete', {
|
||||
|
||||
Reference in New Issue
Block a user