stop guests from setting avatars
parent
0e1186c4f9
commit
25bf4030de
|
@ -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…
Reference in New Issue