You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-19 20:23:18 +03:00
Add clientside error for non-alphanumeric group ID
This commit is contained in:
@ -66,8 +66,12 @@ export default React.createClass({
|
||||
{domain: MatrixClientPeg.get().getDomain()},
|
||||
);
|
||||
} else {
|
||||
const groupId = parsedGroupId[0];
|
||||
const domain = parsedGroupId[1];
|
||||
if (domain !== MatrixClientPeg.get().getDomain()) {
|
||||
|
||||
if (!/^[a-zA-Z0-9]*$/.test(groupId)) {
|
||||
error = _t("Community IDs may only contain alphanumeric characters");
|
||||
} else if (domain !== MatrixClientPeg.get().getDomain()) {
|
||||
error = _t(
|
||||
"It is currently only possible to create communities on your own home server: "+
|
||||
"use a community ID ending with %(domain)s",
|
||||
|
Reference in New Issue
Block a user