Don;t try to fetch push rules if we're a guest: it throws.
This commit is contained in:
parent
0d2b042c0f
commit
038f613079
1 changed files with 6 additions and 4 deletions
|
@ -37,12 +37,14 @@ module.exports = React.createClass({
|
||||||
});
|
});
|
||||||
|
|
||||||
var areNotifsMuted = false;
|
var areNotifsMuted = false;
|
||||||
|
if (!MatrixClientPeg.get().isGuest()) {
|
||||||
var roomPushRule = MatrixClientPeg.get().getRoomPushRule("global", this.props.room.roomId);
|
var roomPushRule = MatrixClientPeg.get().getRoomPushRule("global", this.props.room.roomId);
|
||||||
if (roomPushRule) {
|
if (roomPushRule) {
|
||||||
if (0 <= roomPushRule.actions.indexOf("dont_notify")) {
|
if (0 <= roomPushRule.actions.indexOf("dont_notify")) {
|
||||||
areNotifsMuted = true;
|
areNotifsMuted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name: this._yankValueFromEvent("m.room.name", "name"),
|
name: this._yankValueFromEvent("m.room.name", "name"),
|
||||||
|
|
Loading…
Reference in a new issue