Hide pinning messages behind a labs settings
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
parent
3e066d3aef
commit
6926c96f36
1 changed files with 4 additions and 1 deletions
|
@ -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});
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue