mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
fix isOnQuest function to correctly check for quest being active - fixes https://github.com/HabitRPG/habitrpg/issues/5518
This commit is contained in:
@@ -193,9 +193,8 @@ GroupSchema.methods.finishQuest = function(quest, cb) {
|
||||
mongoose.model('User').update(q, updates, {multi:true}, cb);
|
||||
}
|
||||
|
||||
// FIXME this is a temporary measure, we need to remove quests from users when they traverse parties
|
||||
function isOnQuest(user,progress,group){
|
||||
return group && progress && user.party.quest.key && user.party.quest.key == group.quest.key;
|
||||
return group && progress && user.party.quest.key && group.quest && user.party.quest.key == group.quest.key && group.quest.active;
|
||||
}
|
||||
|
||||
GroupSchema.statics.collectQuest = function(user, progress, cb) {
|
||||
|
||||
Reference in New Issue
Block a user