Add translated gear name to open-mystery-item call (#11306)

* Add translated gear name to open-mystery-item call

* Fix test

* fix mystery item text language
This commit is contained in:
Phillip Thelen
2019-08-16 19:40:49 +02:00
committed by Matteo Pagliazzi
parent c8466eec98
commit 6784d23a7c
3 changed files with 6 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ module.exports = function openMysteryItem (user, req = {}, analytics) {
if (mysteryItems.length === 0) markNotificationAsRead(user);
item = cloneDeep(content.gear.flat[item]);
item.text = content.gear.flat[item.key].text(user.preferences.language);
user.items.gear.owned[item.key] = true;
if (user.markModified) {