Put presence management behind a labs setting

Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
Travis Ralston 2017-10-14 19:13:46 -06:00
parent 854394cb2e
commit 0b20681f6a
3 changed files with 13 additions and 1 deletions

View file

@ -34,6 +34,10 @@ const FEATURES = [
id: 'feature_pinning',
name: _td("Message Pinning"),
},
{
id: 'feature_presence_management',
name: _td("Presence Management"),
},
];
export default {

View file

@ -22,6 +22,7 @@ import MatrixClientPeg from "../../../MatrixClientPeg";
import AccessibleButton from '../elements/AccessibleButton';
import Presence from "../../../Presence";
import dispatcher from "../../../dispatcher";
import UserSettingsStore from "../../../UserSettingsStore";
module.exports = React.createClass({
displayName: 'MemberPresenceAvatar',
@ -112,10 +113,16 @@ module.exports = React.createClass({
<MemberAvatar member={this.props.member} width={this.props.width} height={this.props.height}
resizeMethod={this.props.resizeMethod}/>
);
const statusNode = (
let statusNode = (
<span className={"mx_MemberPresenceAvatar_status mx_MemberPresenceAvatar_status_" + this.state.status}/>
);
// LABS: Disable presence management functions for now
if (!UserSettingsStore.isFeatureEnabled("feature_presence_management")) {
statusNode = null;
onClickFn = null;
}
let avatar = (
<div className="mx_MemberPresenceAvatar">
{avatarNode}

View file

@ -620,6 +620,7 @@
"Cancel": "Cancel",
"or": "or",
"Message Pinning": "Message Pinning",
"Presence Management": "Presence Management",
"Active call": "Active call",
"Monday": "Monday",
"Tuesday": "Tuesday",