Merge pull request #887 from matrix-org/t3chguy/guests_cant_filter

tell guests they can't use filepanel until they register
This commit is contained in:
Matthew Hodgson 2017-05-15 19:45:49 +01:00 committed by GitHub
commit c15a67a8d8

View file

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