Fix PresenceLabel in MemberInfo

Which crashing when clicking on a member if presence was still
enabled.
This commit is contained in:
David Baker 2018-03-21 12:45:09 +00:00
parent 55aeac6990
commit e06783c5c7

View file

@ -871,6 +871,7 @@ module.exports = withMatrixClient(React.createClass({
let presenceLabel = null; let presenceLabel = null;
if (showPresence) { if (showPresence) {
const PresenceLabel = sdk.getComponent('rooms.PresenceLabel');
presenceLabel = <PresenceLabel activeAgo={presenceLastActiveAgo} presenceLabel = <PresenceLabel activeAgo={presenceLastActiveAgo}
currentlyActive={presenceCurrentlyActive} currentlyActive={presenceCurrentlyActive}
presenceState={presenceState} />; presenceState={presenceState} />;
@ -879,7 +880,6 @@ module.exports = withMatrixClient(React.createClass({
let roomMemberDetails = null; let roomMemberDetails = null;
if (this.props.member.roomId) { // is in room if (this.props.member.roomId) { // is in room
const PowerSelector = sdk.getComponent('elements.PowerSelector'); const PowerSelector = sdk.getComponent('elements.PowerSelector');
const PresenceLabel = sdk.getComponent('rooms.PresenceLabel');
roomMemberDetails = <div> roomMemberDetails = <div>
<div className="mx_MemberInfo_profileField"> <div className="mx_MemberInfo_profileField">
{ _t("Level:") } <b> { _t("Level:") } <b>