diff --git a/src/components/structures/RoomStatusBar.js b/src/components/structures/RoomStatusBar.js index 4f9ac153f5..c6a6e1e2d3 100644 --- a/src/components/structures/RoomStatusBar.js +++ b/src/components/structures/RoomStatusBar.js @@ -66,6 +66,10 @@ module.exports = React.createClass({ // result in "X, Y, Z and 100 others are typing." whoIsTypingLimit: PropTypes.number, + // true if the room is being peeked at. This affects components that shouldn't + // logically be shown when peeking, such as a prompt to invite people to a room. + isPeeking: PropTypes.bool, + // callback for when the user clicks on the 'resend all' button in the // 'unsent messages' bar onResendAllClick: PropTypes.func, @@ -457,7 +461,7 @@ module.exports = React.createClass({ } // If you're alone in the room, and have sent a message, suggest to invite someone - if (this.props.sentMessageAndIsAlone) { + if (this.props.sentMessageAndIsAlone && !this.props.isPeeking) { return (
{ _t("There's no one else here! Would you like to invite others " + diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 32121d6de5..8e226bdfcf 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -1595,6 +1595,7 @@ module.exports = React.createClass({ atEndOfLiveTimeline={this.state.atEndOfLiveTimeline} sentMessageAndIsAlone={this.state.isAlone} hasActiveCall={inCall} + isPeeking={myMembership !== "join"} onInviteClick={this.onInviteButtonClick} onStopWarningClick={this.onStopAloneWarningClick} onScrollToBottomClick={this.jumpToLiveTimeline}