1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-07 21:23:00 +03:00

Merge pull request #3260 from matrix-org/t3chguy/hide_msg_action_buttons_on_perms

Introduce RoomContext for sharing state between RoomView and children
This commit is contained in:
J. Ryan Stinnett
2019-07-31 11:43:26 +01:00
committed by GitHub
3 changed files with 61 additions and 36 deletions

View File

@@ -41,11 +41,16 @@ const room = new Matrix.Room();
const WrappedMessagePanel = React.createClass({
childContextTypes: {
matrixClient: React.PropTypes.object,
room: React.PropTypes.object,
},
getChildContext: function() {
return {
matrixClient: client,
room: {
canReact: true,
canReply: true,
},
};
},