cosmetic alias-related bugs
This commit is contained in:
@@ -60,8 +60,8 @@ class NewTopicView extends React.Component {
|
||||
query = query.trim();
|
||||
if (!query) {
|
||||
query = Tinode.DEL_CHAR;
|
||||
} else if (!/[\s,:]/.test(query)) {
|
||||
// No colons, spaces or commas. Try as email or phone.
|
||||
} else if (!/[\s,:]/.test(query) && query != Tinode.DEL_CHAR) {
|
||||
// No colons, spaces or commas, not DEL char. Try as email or phone.
|
||||
// If not email or phone, treat as alias.
|
||||
const email = asEmail(query);
|
||||
if (email) {
|
||||
|
||||
@@ -184,6 +184,7 @@ class TopicDescEdit extends React.Component {
|
||||
}
|
||||
|
||||
if (!alias) {
|
||||
this.setState({aliasError: ''});
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -11713,7 +11713,7 @@ class NewTopicView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Compone
|
||||
query = query.trim();
|
||||
if (!query) {
|
||||
query = tinode_sdk__WEBPACK_IMPORTED_MODULE_2__.Tinode.DEL_CHAR;
|
||||
} else if (!/[\s,:]/.test(query)) {
|
||||
} else if (!/[\s,:]/.test(query) && query != tinode_sdk__WEBPACK_IMPORTED_MODULE_2__.Tinode.DEL_CHAR) {
|
||||
const email = (0,_lib_utils_js__WEBPACK_IMPORTED_MODULE_8__.asEmail)(query);
|
||||
if (email) {
|
||||
query = `email:${email}`;
|
||||
@@ -21225,6 +21225,9 @@ class TopicDescEdit extends (react__WEBPACK_IMPORTED_MODULE_0___default().Compon
|
||||
this.aliasCheckTimer = null;
|
||||
}
|
||||
if (!alias) {
|
||||
this.setState({
|
||||
aliasError: ''
|
||||
});
|
||||
return true;
|
||||
}
|
||||
const valid = ALIAS_REGEX.test(alias);
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user