buyMysterySet records every item in Amplitude. (#12197)
* buyMysterySet records every item in Amplitude. Record only the mysterySet Fixes: #11705 * buyMysterySet records every item in Amplitude. Extend unit test Fixes: #11705
This commit is contained in:
@@ -26,18 +26,19 @@ export default function buyMysterySet (user, req = {}, analytics) {
|
||||
|
||||
each(mysterySet.items, item => {
|
||||
user.items.gear.owned[item.key] = true;
|
||||
if (analytics) {
|
||||
analytics.track('acquire item', {
|
||||
uuid: user._id,
|
||||
itemKey: item.key,
|
||||
itemType: 'Subscriber Gear',
|
||||
acquireMethod: 'Hourglass',
|
||||
category: 'behavior',
|
||||
headers: req.headers,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (analytics) {
|
||||
analytics.track('acquire item', {
|
||||
uuid: user._id,
|
||||
itemKey: mysterySet.key,
|
||||
itemType: 'Subscriber Gear',
|
||||
acquireMethod: 'Hourglass',
|
||||
category: 'behavior',
|
||||
headers: req.headers,
|
||||
});
|
||||
}
|
||||
|
||||
// Here we need to trigger vue reactivity through reassign object
|
||||
user.items.gear.owned = {
|
||||
...user.items.gear.owned,
|
||||
|
||||
Reference in New Issue
Block a user