mirror of
https://github.com/urbit/shrub.git
synced 2024-12-18 07:42:20 +03:00
chat: invite-search shows valid ship in results
This commit is contained in:
parent
5b1c3f3cca
commit
7aeb593fb4
@ -68,6 +68,18 @@ export class InviteSearch extends Component {
|
||||
this.setState({
|
||||
searchResults: { groups: groupMatches, ships: shipMatches }
|
||||
});
|
||||
|
||||
let isValid = true;
|
||||
if (!urbitOb.isValidPatp("~" + searchTerm)) {
|
||||
isValid = false;
|
||||
}
|
||||
|
||||
if ((shipMatches.length === 0) && (isValid)) {
|
||||
shipMatches.push(searchTerm);
|
||||
this.setState({
|
||||
searchResults: { groups: groupMatches, ships: shipMatches }
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user