Wire up the widget permission prompt to the cross-platform setting

This doesn't have any backwards compatibility with anyone who has already clicked "Allow". We kinda want everyone to read the new prompt, so what better way to do it than effectively revoke all widget permissions?

Part of https://github.com/vector-im/riot-web/issues/11262
This commit is contained in:
Travis Ralston 2019-11-18 17:56:33 -07:00
parent fea8737632
commit b185eed462
4 changed files with 41 additions and 21 deletions

View file

@ -400,7 +400,7 @@ export default class WidgetUtils {
return client.setAccountData('m.widgets', userWidgets);
}
static makeAppConfig(appId, app, senderUserId, roomId) {
static makeAppConfig(appId, app, senderUserId, roomId, eventId) {
const myUserId = MatrixClientPeg.get().credentials.userId;
const user = MatrixClientPeg.get().getUser(myUserId);
const params = {
@ -419,6 +419,7 @@ export default class WidgetUtils {
app.creatorUserId = senderUserId;
app.id = appId;
app.eventId = eventId;
app.name = app.name || app.type;
if (app.data) {