tell guests they can't use filepanel until they register

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2017-05-15 10:15:35 +01:00
parent 317e24852d
commit 83cb1e6e29

View file

@ -90,7 +90,11 @@ var FilePanel = React.createClass({
},
render: function() {
if (this.noRoom) {
if (MatrixClientPeg.get().isGuest()) {
return <div className="mx_FilePanel mx_RoomView_messageListWrapper">
<div className="mx_RoomView_empty">You must register to use this functionality</div>
</div>;
} else if (this.noRoom) {
return <div className="mx_FilePanel mx_RoomView_messageListWrapper">
<div className="mx_RoomView_empty">You must join the room to see its files</div>
</div>;