Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 6ce7eb9

Browse files
committed
Don't send RR or RM when peeking at a room
Fixes element-hq/element-web#696 Signed-off-by: Travis Ralston <[email protected]>
1 parent 757e42d commit 6ce7eb9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/structures/RoomView.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ module.exports = React.createClass({
117117
guestsCanJoin: false,
118118
canPeek: false,
119119
showApps: false,
120+
isPeeking: false,
120121

121122
// error object, as from the matrix client/server API
122123
// If we failed to load information about the room,
@@ -266,6 +267,7 @@ module.exports = React.createClass({
266267
console.log("Attempting to peek into room %s", roomId);
267268
this.setState({
268269
peekLoading: true,
270+
isPeeking: true, // this will change to false if peeking fails
269271
});
270272
MatrixClientPeg.get().peekInRoom(roomId).then((room) => {
271273
this.setState({
@@ -290,6 +292,7 @@ module.exports = React.createClass({
290292
} else if (room) {
291293
// Stop peeking because we have joined this room previously
292294
MatrixClientPeg.get().stopPeeking();
295+
this.setState({isPeeking: false});
293296
}
294297
},
295298

@@ -1728,8 +1731,8 @@ module.exports = React.createClass({
17281731
<TimelinePanel ref={this._gatherTimelinePanelRef}
17291732
timelineSet={this.state.room.getUnfilteredTimelineSet()}
17301733
showReadReceipts={!UserSettingsStore.getSyncedSetting('hideReadReceipts', false)}
1731-
manageReadReceipts={true}
1732-
manageReadMarkers={true}
1734+
manageReadReceipts={!this.state.isPeeking}
1735+
manageReadMarkers={!this.state.isPeeking}
17331736
hidden={hideMessagePanel}
17341737
highlightedEventId={highlightedEventId}
17351738
eventId={this.state.initialEventId}

0 commit comments

Comments
 (0)