Don;t try to fetch push rules if we're a guest: it throws.

pull/21833/head
David Baker 2016-02-10 11:16:36 +00:00
parent 0d2b042c0f
commit 038f613079
1 changed files with 6 additions and 4 deletions

View File

@ -37,10 +37,12 @@ module.exports = React.createClass({
});
var areNotifsMuted = false;
var roomPushRule = MatrixClientPeg.get().getRoomPushRule("global", this.props.room.roomId);
if (roomPushRule) {
if (0 <= roomPushRule.actions.indexOf("dont_notify")) {
areNotifsMuted = true;
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;
}
}
}