Merge pull request #5176 from matrix-org/t3chguy/dpsah/6785.4

Fix WatchManager for global room watchers and tidy widget code a little
This commit is contained in:
Michael Telatynski 2020-09-08 15:24:10 +01:00 committed by GitHub
commit 87b72de25f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 20 deletions

View file

@ -405,6 +405,7 @@ export default class WidgetUtils {
app.creatorUserId = senderUserId;
app.id = appId;
app.roomId = roomId;
app.eventId = eventId;
app.name = app.name || app.type;
@ -476,4 +477,13 @@ export default class WidgetUtils {
const url = new URL("jitsi.html#" + queryString, baseUrl); // this strips hash fragment from baseUrl
return url.href;
}
static editWidget(room, app) {
// TODO: Open the right manager for the widget
if (SettingsStore.getValue("feature_many_integration_managers")) {
IntegrationManagers.sharedInstance().openAll(room, 'type_' + app.type, app.id);
} else {
IntegrationManagers.sharedInstance().getPrimaryManager().open(room, 'type_' + app.type, app.id);
}
}
}