Skip to content

Commit

Permalink
Fix missing search
Browse files Browse the repository at this point in the history
  • Loading branch information
saltrafael committed Sep 30, 2021
1 parent bb7f5f7 commit a40af6d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ui/component/channelMentionSuggestions/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,17 @@ export default function ChannelMentionSuggestions(props: Props) {
if (mentionTerm.length > 1 && suggestions !== results) {
suggestions = suggestions.filter((uri) => possibleMatches.includes(uri));
} else if (suggestions === results) {
suggestions = suggestions
.filter((uri) => !allShownUris.includes(uri))
.filter((uri) => !uri.includes(mostSupported));
suggestions = suggestions.filter((uri) => !allShownUris.includes(uri));
}
// $FlowFixMe
suggestions = suggestions
.map((matchUri) => canonical.find((uri) => matchUri.includes(uri)))
.filter((uri) => Boolean(uri));

if (canonical === canonicalResults) {
suggestions = suggestions.filter((uri) => uri !== mostSupported);
}

return !suggestions.length ? null : (
<>
<div className="channel-mention__label">{label}</div>
Expand Down

0 comments on commit a40af6d

Please sign in to comment.