mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
Merge branch 'develop' into release
This commit is contained in:
@@ -442,6 +442,16 @@ schema.methods.isMember = function isGroupMember (user) {
|
||||
}
|
||||
};
|
||||
|
||||
schema.methods.getMemberCount = async function getMemberCount () {
|
||||
let query = { guilds: this._id };
|
||||
|
||||
if (this.type === 'party') {
|
||||
query = { 'party._id': this._id };
|
||||
}
|
||||
|
||||
return await User.count(query).exec();
|
||||
};
|
||||
|
||||
export function chatDefaults (msg, user) {
|
||||
let message = {
|
||||
id: shared.uuid(),
|
||||
|
||||
Reference in New Issue
Block a user