Merge pull request #4458 from matrix-org/travis/fix-sticker-picker-add

Use WidgetType more often to avoid breaking new sticker pickers
This commit is contained in:
Travis Ralston 2020-04-23 08:18:12 -06:00 committed by GitHub
commit 35dd892dce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 13 deletions

View file

@ -211,9 +211,9 @@ export default class WidgetUtils {
});
}
static setUserWidget(widgetId, widgetType, widgetUrl, widgetName, widgetData) {
static setUserWidget(widgetId, widgetType: WidgetType, widgetUrl, widgetName, widgetData) {
const content = {
type: widgetType,
type: widgetType.preferred,
url: widgetUrl,
name: widgetName,
data: widgetData,
@ -370,7 +370,7 @@ export default class WidgetUtils {
static addIntegrationManagerWidget(name: string, uiUrl: string, apiUrl: string) {
return WidgetUtils.setUserWidget(
"integration_manager_" + (new Date().getTime()),
"m.integration_manager",
WidgetType.INTEGRATION_MANAGER,
uiUrl,
"Integration Manager: " + name,
{"api_url": apiUrl},