Skip to content

Commit

Permalink
Added conditional to exclude user from search.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmith111 committed Dec 22, 2020
1 parent bcd4065 commit 01bf077
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pages/home/sidebar/ChatSwitcherView.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,11 @@ class ChatSwitcherView extends React.Component {
groupOption.login === option.login
));

// We must ignore the user if it matches the currently logged in user.
if (this.props.session.email === option.login) {
continue;
}

// Make sure we don't include the same option twice (automatically handled by using a `Set`)
if (isMatch && !isInGroupUsers) {
matches.add(option);
Expand Down

0 comments on commit 01bf077

Please sign in to comment.