You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-13 23:41:50 +03:00
Check error to see if it's actually a failure to peek
This commit is contained in:
@ -177,11 +177,15 @@ module.exports = React.createClass({
|
||||
roomProm.then((room) => {
|
||||
this._calculatePeekRules(room);
|
||||
return this._initTimeline(this.props);
|
||||
}).catch(() => {
|
||||
// This is fine: the room just isn't peekable (we assume).
|
||||
this.setState({
|
||||
timelineLoading: false,
|
||||
});
|
||||
}).catch((err) => {
|
||||
if (err.errcode == "M_GUEST_ACCESS_FORBIDDEN") {
|
||||
// This is fine: the room just isn't peekable (we assume).
|
||||
this.setState({
|
||||
timelineLoading: false,
|
||||
});
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
}).done();
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user