From 164c9b90314c246cf393d2386839933d8c6b5e24 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 3 Feb 2016 16:53:48 +0000 Subject: [PATCH] Check error to see if it's actually a failure to peek --- src/components/structures/RoomView.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 4373569fd4..0d00b9afe5 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -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(); },