Hide pinning messages behind a labs settings

Signed-off-by: Travis Ralston <travpc@gmail.com>
pull/5142/head
Travis Ralston 2017-10-14 16:41:44 -06:00
parent 3e066d3aef
commit 6926c96f36
1 changed files with 4 additions and 1 deletions

View File

@ -64,7 +64,10 @@ module.exports = React.createClass({
const room = cli.getRoom(this.props.mxEvent.getRoomId());
const canRedact = room.currentState.maySendRedactionForEvent(this.props.mxEvent, cli.credentials.userId);
const canPin = room.currentState.mayClientSendStateEvent('m.room.pinned_events', cli);
let canPin = room.currentState.mayClientSendStateEvent('m.room.pinned_events', cli);
// HACK: Intentionally say we can't pin if the user doesn't want to use the functionality
if (!UserSettingsStore.isFeatureEnabled("feature_pinning")) canPin = false;
this.setState({canRedact, canPin});
},