Send messages on widget addition and deletion
parent
308d932b2f
commit
18ae5fd129
|
@ -338,6 +338,12 @@ function setWidget(event, roomId) {
|
|||
sendResponse(event, {
|
||||
success: true,
|
||||
});
|
||||
|
||||
if (widgetUrl !== null) {
|
||||
client.sendTextMessage(roomId, `Added ${widgetType} widget - ${widgetUrl}`);
|
||||
} else {
|
||||
client.sendTextMessage(roomId, `Removed ${widgetType} widget`);
|
||||
}
|
||||
}, (err) => {
|
||||
sendError(event, _t('Failed to send request.'), err);
|
||||
});
|
||||
|
|
|
@ -121,7 +121,9 @@ module.exports = React.createClass({
|
|||
this.scalarClient.getScalarInterfaceUrlForRoom(this.props.room.roomId) :
|
||||
null,
|
||||
onFinished: ()=>{
|
||||
this.props.onCancelClick(ev);
|
||||
if (this.props.onCancelClick) {
|
||||
this.props.onCancelClick(ev);
|
||||
}
|
||||
},
|
||||
}, "mx_IntegrationsManager");
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue