1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-13 23:41:50 +03:00

Comment error handling

This commit is contained in:
David Baker
2016-02-04 11:17:39 +00:00
parent 5c430395ea
commit c9a3ad31ab

View File

@ -178,6 +178,9 @@ module.exports = React.createClass({
this._calculatePeekRules(room);
return this._initTimeline(this.props);
}).catch((err) => {
// This won't necessarily be a MatrixError, but we duck-type
// here and say if it's got an 'errcode' key with the right value,
// it means we can't peek.
if (err.errcode == "M_GUEST_ACCESS_FORBIDDEN") {
// This is fine: the room just isn't peekable (we assume).
this.setState({