chat-fe: ignore comets in autocomplete

This commit is contained in:
Liam Fitzgerald 2020-03-20 15:27:05 +10:00
parent 2f97099e94
commit 14399777e0
3 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -147,13 +147,13 @@ export class ChatInput extends Component {
const suggestions = _.chain(this.props.envelopes)
.map("author")
.uniq()
.filter(s => s.startsWith(match[1]))
.filter(s => s.startsWith(match[1]) && s.length < 28) // exclude comets
.take(3)
.value();
const advance = _.chain(suggestions)
.map(s => s.replace(match[0], ''))
.reduce(getAdvance, )
.reduce(getAdvance)
.value();
let newState = {