Skip to content

Commit 6926c96

Browse files
committed
Hide pinning messages behind a labs settings
Signed-off-by: Travis Ralston <travpc@gmail.com>
1 parent 3e066d3 commit 6926c96

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/components/views/context_menus/MessageContextMenu.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ module.exports = React.createClass({
6464
const room = cli.getRoom(this.props.mxEvent.getRoomId());
6565

6666
const canRedact = room.currentState.maySendRedactionForEvent(this.props.mxEvent, cli.credentials.userId);
67-
const canPin = room.currentState.mayClientSendStateEvent('m.room.pinned_events', cli);
67+
let canPin = room.currentState.mayClientSendStateEvent('m.room.pinned_events', cli);
68+
69+
// HACK: Intentionally say we can't pin if the user doesn't want to use the functionality
70+
if (!UserSettingsStore.isFeatureEnabled("feature_pinning")) canPin = false;
6871

6972
this.setState({canRedact, canPin});
7073
},

0 commit comments

Comments
 (0)