Merge branch 'develop' into release

This commit is contained in:
SabreCat
2018-03-01 23:23:57 +00:00
39 changed files with 1140 additions and 666 deletions

View File

@@ -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(),