Merge pull request #2709 from urbit/mp/chat/namespace-group-chats

chat: add unique ID to grouped chat paths
This commit is contained in:
ixv 2020-04-09 15:54:53 -07:00 committed by GitHub
commit b43f4d9d39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,6 +95,7 @@ export class NewScreen extends Component {
onClickCreate() {
const { props, state } = this;
let grouped = (this.state.createGroup || (this.state.groups.length > 0));
if (!state.title) {
this.setState({
@ -104,7 +105,7 @@ export class NewScreen extends Component {
return;
}
let station = `/${state.idName}`;
let station = `/${state.idName}` + (grouped ? `-${Math.floor(Math.random() * 10000)}` : "");
if (station in props.inbox) {
this.setState({