mirror of
https://github.com/element-hq/element-web
synced 2024-11-25 18:55:58 +03:00
Don't send RR or RM when peeking at a room
Fixes vector-im/riot-web#696 Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
parent
757e42ddca
commit
6ce7eb952a
1 changed files with 5 additions and 2 deletions
|
@ -117,6 +117,7 @@ module.exports = React.createClass({
|
||||||
guestsCanJoin: false,
|
guestsCanJoin: false,
|
||||||
canPeek: false,
|
canPeek: false,
|
||||||
showApps: false,
|
showApps: false,
|
||||||
|
isPeeking: false,
|
||||||
|
|
||||||
// error object, as from the matrix client/server API
|
// error object, as from the matrix client/server API
|
||||||
// If we failed to load information about the room,
|
// If we failed to load information about the room,
|
||||||
|
@ -266,6 +267,7 @@ module.exports = React.createClass({
|
||||||
console.log("Attempting to peek into room %s", roomId);
|
console.log("Attempting to peek into room %s", roomId);
|
||||||
this.setState({
|
this.setState({
|
||||||
peekLoading: true,
|
peekLoading: true,
|
||||||
|
isPeeking: true, // this will change to false if peeking fails
|
||||||
});
|
});
|
||||||
MatrixClientPeg.get().peekInRoom(roomId).then((room) => {
|
MatrixClientPeg.get().peekInRoom(roomId).then((room) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
@ -290,6 +292,7 @@ module.exports = React.createClass({
|
||||||
} else if (room) {
|
} else if (room) {
|
||||||
// Stop peeking because we have joined this room previously
|
// Stop peeking because we have joined this room previously
|
||||||
MatrixClientPeg.get().stopPeeking();
|
MatrixClientPeg.get().stopPeeking();
|
||||||
|
this.setState({isPeeking: false});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1728,8 +1731,8 @@ module.exports = React.createClass({
|
||||||
<TimelinePanel ref={this._gatherTimelinePanelRef}
|
<TimelinePanel ref={this._gatherTimelinePanelRef}
|
||||||
timelineSet={this.state.room.getUnfilteredTimelineSet()}
|
timelineSet={this.state.room.getUnfilteredTimelineSet()}
|
||||||
showReadReceipts={!UserSettingsStore.getSyncedSetting('hideReadReceipts', false)}
|
showReadReceipts={!UserSettingsStore.getSyncedSetting('hideReadReceipts', false)}
|
||||||
manageReadReceipts={true}
|
manageReadReceipts={!this.state.isPeeking}
|
||||||
manageReadMarkers={true}
|
manageReadMarkers={!this.state.isPeeking}
|
||||||
hidden={hideMessagePanel}
|
hidden={hideMessagePanel}
|
||||||
highlightedEventId={highlightedEventId}
|
highlightedEventId={highlightedEventId}
|
||||||
eventId={this.state.initialEventId}
|
eventId={this.state.initialEventId}
|
||||||
|
|
Loading…
Reference in a new issue