add GET group

This commit is contained in:
Matteo Pagliazzi
2015-12-18 16:32:37 +01:00
parent e53bd5079a
commit 7adc060312
3 changed files with 56 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ api.getChat = {
if (groupId === 'party' || user.party._id === groupId) {
query = {type: 'party', _id: user.party._id};
} else if (user.guilds.indexOf(groupId)) {
} else if (user.guilds.indexOf(groupId) !== -1) {
query = {type: 'guild', _id: groupId};
} else {
query = {type: 'guild', privacy: 'public', _id: groupId};