You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
Simplify canUserModifyWidgets API
This commit is contained in:
@@ -102,13 +102,8 @@ export default React.createClass({
|
||||
},
|
||||
|
||||
_canUserModify: function() {
|
||||
try {
|
||||
return WidgetUtils.canUserModifyWidgets(this.props.room.roomId);
|
||||
} catch(err) {
|
||||
console.error(err);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
return WidgetUtils.canUserModifyWidgets(this.props.room.roomId);
|
||||
}
|
||||
|
||||
_onEditClick: function(e) {
|
||||
console.log("Edit widget ID ", this.props.id);
|
||||
|
||||
Reference in New Issue
Block a user