stop guests from setting avatars
This commit is contained in:
parent
0e1186c4f9
commit
25bf4030de
1 changed files with 9 additions and 0 deletions
|
@ -90,6 +90,15 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
onAvatarPickerClick: function(ev) {
|
onAvatarPickerClick: function(ev) {
|
||||||
|
if (MatrixClientPeg.get().isGuest()) {
|
||||||
|
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
|
Modal.createDialog(ErrorDialog, {
|
||||||
|
title: "Error",
|
||||||
|
description: "Guests can't set avatars. Please register.",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.refs.file_label) {
|
if (this.refs.file_label) {
|
||||||
this.refs.file_label.click();
|
this.refs.file_label.click();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue