You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
stop guests from setting avatars
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user