You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Support multiple integration managers behind a labs flag
Fixes https://github.com/vector-im/riot-web/issues/10622 Implements [MSC1957](https://github.com/matrix-org/matrix-doc/pull/1957) Design is not final.
This commit is contained in:
@@ -548,8 +548,8 @@ const onMessage = function(event) {
|
||||
// (See https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage)
|
||||
let configUrl;
|
||||
try {
|
||||
// TODO: Support multiple integration managers
|
||||
configUrl = new URL(IntegrationManagers.sharedInstance().getPrimaryManager().uiUrl);
|
||||
if (!openManagerUrl) openManagerUrl = IntegrationManagers.sharedInstance().getPrimaryManager().uiUrl;
|
||||
configUrl = new URL(openManagerUrl);
|
||||
} catch (e) {
|
||||
// No integrations UI URL, ignore silently.
|
||||
return;
|
||||
@@ -657,6 +657,7 @@ const onMessage = function(event) {
|
||||
};
|
||||
|
||||
let listenerCount = 0;
|
||||
let openManagerUrl = null;
|
||||
module.exports = {
|
||||
startListening: function() {
|
||||
if (listenerCount === 0) {
|
||||
@@ -679,4 +680,8 @@ module.exports = {
|
||||
console.error(e);
|
||||
}
|
||||
},
|
||||
|
||||
setOpenManagerUrl: function(url) {
|
||||
openManagerUrl = url;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user