mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 21:27:23 +01:00
properly update user properties in events
This commit is contained in:
@@ -187,7 +187,7 @@ api.postChat = {
|
||||
// Check if account is newer than the minimum age for chat participation
|
||||
if (moment().diff(user.auth.timestamps.created, 'minutes') < ACCOUNT_MIN_CHAT_AGE) {
|
||||
analytics.track('chat age error', {
|
||||
user: pick(user, ['preferences', 'registeredThrough']),
|
||||
user,
|
||||
uuid: user._id,
|
||||
hitType: 'event',
|
||||
category: 'behavior',
|
||||
@@ -239,7 +239,7 @@ api.postChat = {
|
||||
await Promise.all(toSave);
|
||||
|
||||
const analyticsObject = {
|
||||
user: pick(user, ['preferences', 'registeredThrough']),
|
||||
user,
|
||||
uuid: user._id,
|
||||
hitType: 'event',
|
||||
category: 'behavior',
|
||||
|
||||
Reference in New Issue
Block a user