Buggy code, no idea why toWidget gets no response

This commit is contained in:
Nischay
2024-04-21 19:44:54 +05:30
parent 380a070e71
commit 0897ce6c20
3 changed files with 10 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ const isMobileSafari = navigator.userAgent.match(/(iPod|iPhone|iPad)/) && naviga
const supportedThemes = ["light", "dark", "black"]
const defaultState = {
packs: [],
filtering: {

View File

@@ -17,10 +17,18 @@
const widgetId = null; // if you know the widget ID, supply it.
const api = new mxwidgets.WidgetApi(widgetId);
// Before doing anything else, request capabilities:
api.requestCapabilities(mxwidgets.StickerpickerCapabilities);
api.requestCapability(mxwidgets.MatrixCapabilities.MSC4039UploadFile);
// Start the messaging
api.start();
// If waitForIframeLoad is false, tell the client that we're good to go
api.sendContentLoaded();
export function sendSticker(content){
api.sendSticker(content);
}