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:
David Baker 2016-02-10 12:34:08 +00:00
commit f016a327b1

View file

@ -37,12 +37,14 @@ module.exports = React.createClass({
});
var areNotifsMuted = false;
if (!MatrixClientPeg.get().isGuest()) {
var roomPushRule = MatrixClientPeg.get().getRoomPushRule("global", this.props.room.roomId);
if (roomPushRule) {
if (0 <= roomPushRule.actions.indexOf("dont_notify")) {
areNotifsMuted = true;
}
}
}
return {
name: this._yankValueFromEvent("m.room.name", "name"),