Option to remove the presence feature by HS

Adds a config option that disables showing presence for certain
HS URLs, so we can disable it on matrix.org where the feature is
turned off.
This commit is contained in:
David Baker
2018-03-19 16:47:12 +00:00
parent 0f6a21849e
commit 31b772997e
4 changed files with 59 additions and 14 deletions
+8 -1
View File
@@ -30,6 +30,13 @@ module.exports = React.createClass({
propTypes: {
member: PropTypes.any.isRequired, // RoomMember
showPresence: PropTypes.bool,
},
getDefaultProps: function() {
return {
showPresence: true,
};
},
getInitialState: function() {
@@ -99,7 +106,7 @@ module.exports = React.createClass({
presenceLastTs={member.user ? member.user.lastPresenceTs : 0}
presenceCurrentlyActive={member.user ? member.user.currentlyActive : false}
avatarJsx={av} title={this.getPowerLabel()} onClick={this.onClick}
name={name} powerStatus={powerStatus} />
name={name} powerStatus={powerStatus} showPresence={this.props.showPresence} />
);
},
});