mirror of
https://github.com/maunium/stickerpicker.git
synced 2025-08-28 19:01:44 +02:00
Buggy code, no idea why toWidget gets no response
This commit is contained in:
@@ -40,6 +40,7 @@ const isMobileSafari = navigator.userAgent.match(/(iPod|iPhone|iPad)/) && naviga
|
||||
|
||||
const supportedThemes = ["light", "dark", "black"]
|
||||
|
||||
|
||||
const defaultState = {
|
||||
packs: [],
|
||||
filtering: {
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user