Use the existing room object
For some reason, we were getting the room object for every event during read receipt processing, even though it has been passed in as a prop already.
This commit is contained in:
parent
06547ef5b3
commit
8e811fc78e
1 changed files with 5 additions and 1 deletions
|
@ -52,6 +52,10 @@ module.exports = React.createClass({
|
||||||
// ID of an event to highlight. If undefined, no event will be highlighted.
|
// ID of an event to highlight. If undefined, no event will be highlighted.
|
||||||
highlightedEventId: PropTypes.string,
|
highlightedEventId: PropTypes.string,
|
||||||
|
|
||||||
|
// The room these events are all in together, if any.
|
||||||
|
// (The notification panel won't have a room here, for example.)
|
||||||
|
room: PropTypes.object,
|
||||||
|
|
||||||
// Should we show URL Previews
|
// Should we show URL Previews
|
||||||
showUrlPreview: PropTypes.bool,
|
showUrlPreview: PropTypes.bool,
|
||||||
|
|
||||||
|
@ -615,7 +619,7 @@ module.exports = React.createClass({
|
||||||
const myUserId = MatrixClientPeg.get().credentials.userId;
|
const myUserId = MatrixClientPeg.get().credentials.userId;
|
||||||
|
|
||||||
// get list of read receipts, sorted most recent first
|
// get list of read receipts, sorted most recent first
|
||||||
const room = MatrixClientPeg.get().getRoom(event.getRoomId());
|
const { room } = this.props;
|
||||||
if (!room) {
|
if (!room) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue