mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 21:27:23 +01:00
build(deps): bump mongoose from 5.11.8 to 5.11.9 (#12927)
* build(deps): bump mongoose from 5.11.8 to 5.11.9 Bumps [mongoose](https://github.com/Automattic/mongoose) from 5.11.8 to 5.11.9. - [Release notes](https://github.com/Automattic/mongoose/releases) - [Changelog](https://github.com/Automattic/mongoose/blob/master/History.md) - [Commits](https://github.com/Automattic/mongoose/compare/5.11.8...5.11.9) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * fix(join group): update inviter once * mongoose@5.11.10 Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>
This commit is contained in:
committed by
GitHub
parent
7222ee0a10
commit
405f744770
@@ -640,7 +640,6 @@ api.joinGroup = {
|
||||
inviter.items.quests.basilist += 1;
|
||||
inviter.markModified('items.quests');
|
||||
}
|
||||
promises.push(inviter.save());
|
||||
}
|
||||
|
||||
if (group.type === 'party' && inviter) {
|
||||
@@ -651,6 +650,7 @@ api.joinGroup = {
|
||||
{
|
||||
$or: [{ 'party._id': group._id }, { _id: user._id }],
|
||||
'achievements.partyUp': { $ne: true },
|
||||
_id: { $ne: inviter._id },
|
||||
},
|
||||
{
|
||||
$set: { 'achievements.partyUp': true },
|
||||
@@ -661,8 +661,7 @@ api.joinGroup = {
|
||||
|
||||
if (inviter) {
|
||||
if (inviter.achievements.partyUp !== true) {
|
||||
// Since the notification list of the inviter is already
|
||||
// updated in this save we need to add the notification here
|
||||
inviter.achievements.partyUp = true;
|
||||
inviter.addNotification('ACHIEVEMENT_PARTY_UP');
|
||||
}
|
||||
}
|
||||
@@ -675,6 +674,7 @@ api.joinGroup = {
|
||||
{
|
||||
$or: [{ 'party._id': group._id }, { _id: user._id }],
|
||||
'achievements.partyOn': { $ne: true },
|
||||
_id: { $ne: inviter._id },
|
||||
},
|
||||
{
|
||||
$set: { 'achievements.partyOn': true },
|
||||
@@ -685,14 +685,14 @@ api.joinGroup = {
|
||||
|
||||
if (inviter) {
|
||||
if (inviter.achievements.partyOn !== true) {
|
||||
// Since the notification list of the inviter is already
|
||||
// updated in this save we need to add the notification here
|
||||
inviter.achievements.partyOn = true;
|
||||
inviter.addNotification('ACHIEVEMENT_PARTY_ON');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (inviter) promises.push(inviter.save());
|
||||
promises = await Promise.all(promises);
|
||||
|
||||
if (group.hasNotCancelled()) {
|
||||
|
||||
Reference in New Issue
Block a user