diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index f9624a54d7..03dfc959ef 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -90,6 +90,15 @@ module.exports = React.createClass({ }, 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) { this.refs.file_label.click(); }