You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-11-28 09:24:05 +03:00
Comment error handling
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user