mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 06:35:32 +03:00
chat-fe: redirect to DMs on trivial new group case
Create or view a DM upon trying to create an invite-only group with one invitee.
This commit is contained in:
parent
2c870cdfc0
commit
a2998bdc41
@ -261,6 +261,7 @@ export class ShipSearchInput extends Component {
|
||||
componentDidMount() {
|
||||
document.addEventListener("mousedown", this.onClick);
|
||||
document.addEventListener("touchstart", this.onClick);
|
||||
this.inputRef.current.focus();
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
@ -124,6 +124,10 @@ export class NewScreen extends Component {
|
||||
}
|
||||
});
|
||||
|
||||
if(state.ships.length === 1 && state.security === 'village') {
|
||||
props.history.push(`/~chat/new/dm/${aud[0]}`);
|
||||
}
|
||||
|
||||
if (!isValid) {
|
||||
this.setState({
|
||||
inviteError: true,
|
||||
|
Loading…
Reference in New Issue
Block a user