You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Use WidgetType more often to avoid breaking new sticker pickers
Turns out that setUserWidget() wasn't updated to take a real WidgetType, but the code in ScalarMessaging thought it did. This leads to integration managers trying to add sticker widgets with an object `type` rather than a string `type`, which doesn't work. This updates other code paths which call into the various widget classes to use WidgetType more often. The actual code path for fixing widgets is resolved in WidgetUtils for the setUserWidget function body.
This commit is contained in:
@@ -16,6 +16,8 @@ limitations under the License.
|
||||
|
||||
export class WidgetType {
|
||||
public static readonly JITSI = new WidgetType("m.jitsi", "jitsi");
|
||||
public static readonly STICKERPICKER = new WidgetType("m.stickerpicker", "m.stickerpicker");
|
||||
public static readonly INTEGRATION_MANAGER = new WidgetType("m.integration_manager", "m.integration_manager");
|
||||
public static readonly CUSTOM = new WidgetType("m.custom", "m.custom");
|
||||
|
||||
constructor(public readonly preferred: string, public readonly legacy: string) {
|
||||
|
||||
Reference in New Issue
Block a user