Merge pull request #152 from matrix-org/dbkr/fix_room_settings_guest_exception
Don't try to fetch push rules if we're a guest: it throws.
This commit is contained in:
commit
f016a327b1
1 changed files with 6 additions and 4 deletions
|
@ -37,10 +37,12 @@ module.exports = React.createClass({
|
||||||
});
|
});
|
||||||
|
|
||||||
var areNotifsMuted = false;
|
var areNotifsMuted = false;
|
||||||
var roomPushRule = MatrixClientPeg.get().getRoomPushRule("global", this.props.room.roomId);
|
if (!MatrixClientPeg.get().isGuest()) {
|
||||||
if (roomPushRule) {
|
var roomPushRule = MatrixClientPeg.get().getRoomPushRule("global", this.props.room.roomId);
|
||||||
if (0 <= roomPushRule.actions.indexOf("dont_notify")) {
|
if (roomPushRule) {
|
||||||
areNotifsMuted = true;
|
if (0 <= roomPushRule.actions.indexOf("dont_notify")) {
|
||||||
|
areNotifsMuted = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue