Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/feat/room-list-widgets

 Conflicts:
	src/components/views/elements/AppTile.js
This commit is contained in:
Michael Telatynski 2020-10-21 12:48:51 +01:00
commit 4e12aeca9e
60 changed files with 1357 additions and 1128 deletions

View file

@ -488,6 +488,7 @@ export default class WidgetUtils {
'avatarUrl=$matrix_avatar_url',
'userId=$matrix_user_id',
'roomId=$matrix_room_id',
'theme=$theme',
];
if (opts.auth) {
queryStringParts.push(`auth=${opts.auth}`);
@ -523,4 +524,16 @@ export default class WidgetUtils {
IntegrationManagers.sharedInstance().getPrimaryManager().open(room, 'type_' + app.type, app.id);
}
}
static isManagedByManager(app) {
if (WidgetUtils.isScalarUrl(app.url)) {
const managers = IntegrationManagers.sharedInstance();
if (managers.hasManager()) {
// TODO: Pick the right manager for the widget
const defaultManager = managers.getPrimaryManager();
return WidgetUtils.isScalarUrl(defaultManager.apiUrl);
}
}
return false;
}
}