1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-08 21:42:24 +03:00

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
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},