|
|
@ -23,14 +23,17 @@ window.onmessage = event => { |
|
|
|
widgetId = request.widgetId |
|
|
|
} |
|
|
|
|
|
|
|
window.parent.postMessage({ |
|
|
|
...request, |
|
|
|
response: request.action === "capabilities" ? { |
|
|
|
capabilities: ["m.sticker"], |
|
|
|
} : { |
|
|
|
error: { message: "Action not supported" }, |
|
|
|
}, |
|
|
|
}, event.origin) |
|
|
|
let response |
|
|
|
|
|
|
|
if (request.action === "visibility") { |
|
|
|
response = {} |
|
|
|
} else if (request.action === "capabilities") { |
|
|
|
response = { capabilities: ["m.sticker"] } |
|
|
|
} else { |
|
|
|
response = { error: { message: "Action not supported" } } |
|
|
|
} |
|
|
|
|
|
|
|
window.parent.postMessage({ ...request, response }, event.origin) |
|
|
|
} |
|
|
|
|
|
|
|
export function sendSticker(content) { |
|
|
|