Error message #1: guests can't invite people. Also add a dialog box for telling people they need to register.
This commit is contained in:
parent
c31fbf1214
commit
5f1fabd982
3 changed files with 86 additions and 0 deletions
|
@ -142,9 +142,18 @@ module.exports = React.createClass({
|
|||
|
||||
onInvite: function(inputText) {
|
||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||
var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog");
|
||||
var self = this;
|
||||
inputText = inputText.trim(); // react requires es5-shim so we know trim() exists
|
||||
|
||||
if (MatrixClientPeg.get().isGuest()) {
|
||||
Modal.createDialog(NeedToRegisterDialog, {
|
||||
title: "Unable to Invite",
|
||||
description: "Guest user can't invite new users. Please register to be able to invite new users into a room."
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// email addresses and user IDs do not allow space, comma, semicolon so split
|
||||
// on them for bulk inviting.
|
||||
var separators =[ ";", " ", "," ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue