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:
commit
35dd892dce
4 changed files with 15 additions and 13 deletions
|
@ -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},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue