mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Challenge Won Notification improvements (#12762)
* challenge won notification: add more info * update tests * use new notification on web, fixes #7716 * wip design * finalize design * fix markdown rendering
This commit is contained in:
@@ -379,7 +379,12 @@ schema.methods.closeChal = async function closeChal (broken = {}) {
|
||||
winner.balance += challenge.prize / 4;
|
||||
}
|
||||
|
||||
winner.addNotification('WON_CHALLENGE');
|
||||
winner.addNotification('WON_CHALLENGE', {
|
||||
id: challenge._id,
|
||||
name: challenge.name,
|
||||
prize: challenge.prize,
|
||||
leader: challenge.leader,
|
||||
});
|
||||
|
||||
const savedWinner = await winner.save();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user