Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit c15a67a

Browse files
authored
Merge pull request #887 from matrix-org/t3chguy/guests_cant_filter
tell guests they can't use filepanel until they register
2 parents 824da83 + 8715b52 commit c15a67a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/structures/FilePanel.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ var FilePanel = React.createClass({
9090
},
9191

9292
render: function() {
93-
if (this.noRoom) {
93+
if (MatrixClientPeg.get().isGuest()) {
94+
return <div className="mx_FilePanel mx_RoomView_messageListWrapper">
95+
<div className="mx_RoomView_empty">You must <a href="#/register">register</a> to use this functionality</div>
96+
</div>;
97+
} else if (this.noRoom) {
9498
return <div className="mx_FilePanel mx_RoomView_messageListWrapper">
9599
<div className="mx_RoomView_empty">You must join the room to see its files</div>
96100
</div>;

0 commit comments

Comments
 (0)