allow TLDs longer than 5 characters, actually close on sucess

pull/807/head
Ryan Tharp 5 years ago
parent b9ab28e2fc
commit 1179105a75

@ -364,7 +364,8 @@ export class LeftPaneChannelSection extends React.Component<Props, State> {
return false;
}
const regexURL = /(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?/;
// longest TLD is now (20/02/06) 24 characters per https://jasontucker.blog/8945/what-is-the-longest-tld-you-can-get-for-a-domain-name
const regexURL = /(http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,24}(:[0-9]{1,5})?(\/.*)?/;
if (groupUrl.length <= 0) {
window.pushToast({
@ -387,7 +388,7 @@ export class LeftPaneChannelSection extends React.Component<Props, State> {
}
joinChannelStateManager(this, groupUrl, () => {
this.handleToggleOverlay(SessionGroupType.Open);
this.handleToggleOverlay(undefined);
});
return true;

Loading…
Cancel
Save