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