mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-04 04:59:40 +00:00
Correctly handle autocomplete for public and private guilds
This commit is contained in:
parent
af510ce86f
commit
1173a9b586
2 changed files with 8 additions and 2 deletions
|
|
@ -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 () {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue