mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Sept 23 fixes (#9074)
* Discover challenges * Fixed hero loading * Moved add task button * Fixed bailey showing * Added logs for bad sub data * Fixed blurb editing * Added confirmation for deleteing message * Reset invite modals on invite * fixed group member sorting * Fixed chat time styles * Fixed hover on liked * Fixed like count * Added reverse * Fixed editing party * Added leader conditions * Added search * Added loading * Reset members when leaving party * Rounded pending * Fixed overflow on collecting quests * Added to invite friends * Hid summary from party * Fixed button styles * Fixed button class * Removed okay button * Fixed renav for profile modal * Added subscription back to menu * Fixed static link * Added daily due setting * Added local auth adding * Fixed centering of text * Removed message locally * Added count for new message * Added style fix for profile pet * Fixed achievement popovers * Fixed white boxes * Added plain color backgrounds * fixed challenge mutability * Fixed challenge editing * Added notation for large numbers * Add color text to guild sizes * Removed membership filters from discover challenges * Added invites to group * Cmd + enter send message * Made leader clickable * Updated group validation * Added cancelling autocomplete * Added mention icon * Added removing member * Removed extra string
This commit is contained in:
@@ -170,6 +170,8 @@ api.getMemberAchievements = {
|
||||
};
|
||||
|
||||
// Return a request handler for getMembersForGroup / getInvitesForGroup / getMembersForChallenge
|
||||
|
||||
// @TODO: This violates the Liskov substitution principle. We should create factory functions. See Webhooks for a good example
|
||||
function _getMembersForItem (type) {
|
||||
// check for allowed `type`
|
||||
if (['group-members', 'group-invites', 'challenge-members'].indexOf(type) === -1) {
|
||||
@@ -243,9 +245,18 @@ function _getMembersForItem (type) {
|
||||
} else if (type === 'group-invites') {
|
||||
if (group.type === 'guild') { // eslint-disable-line no-lonely-if
|
||||
query['invitations.guilds.id'] = group._id;
|
||||
|
||||
if (req.query.includeAllPublicFields === 'true') {
|
||||
fields = memberFields;
|
||||
addComputedStats = true;
|
||||
}
|
||||
} else {
|
||||
query['invitations.party.id'] = group._id; // group._id and not groupId because groupId could be === 'party'
|
||||
// @TODO invitations are now stored like this: `'invitations.parties': []` Probably need a database index for it.
|
||||
if (req.query.includeAllPublicFields === 'true') {
|
||||
fields = memberFields;
|
||||
addComputedStats = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user