Check error to see if it's actually a failure to peek
This commit is contained in:
parent
cebc2f5306
commit
164c9b9031
1 changed files with 9 additions and 5 deletions
|
@ -177,11 +177,15 @@ module.exports = React.createClass({
|
||||||
roomProm.then((room) => {
|
roomProm.then((room) => {
|
||||||
this._calculatePeekRules(room);
|
this._calculatePeekRules(room);
|
||||||
return this._initTimeline(this.props);
|
return this._initTimeline(this.props);
|
||||||
}).catch(() => {
|
}).catch((err) => {
|
||||||
|
if (err.errcode == "M_GUEST_ACCESS_FORBIDDEN") {
|
||||||
// This is fine: the room just isn't peekable (we assume).
|
// This is fine: the room just isn't peekable (we assume).
|
||||||
this.setState({
|
this.setState({
|
||||||
timelineLoading: false,
|
timelineLoading: false,
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
}).done();
|
}).done();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue