Correctly handle autocomplete for public and private guilds

This commit is contained in:
Phillip Thelen 2019-02-15 15:56:18 +01:00
parent af510ce86f
commit 1173a9b586
2 changed files with 8 additions and 2 deletions

View file

@ -370,7 +370,13 @@ export default {
return this.group.memberCount > this.$store.state.constants.LARGE_GROUP_COUNT_MESSAGE_CUTOFF;
},
autocompleteContext () {
return this.isParty ? 'party' : 'guild';
if (this.isParty) {
return 'party';
} else if (this.group.privacy === 'public') {
return 'publicGuild';
} else {
return 'privateGuild';
}
},
},
mounted () {

View file

@ -29,7 +29,7 @@ api.getUsernameAutocompletes = {
if (context && id) {
if (context === 'party') {
query['party._id'] = id;
} else if (context === 'guild') {
} else if (context === 'privateGuild') {
query.guilds = id;
}
}