Send empty response to visibility action
This commit is contained in:
parent
89861f8a2c
commit
df75622fda
@ -23,14 +23,17 @@ window.onmessage = event => {
|
|||||||
widgetId = request.widgetId
|
widgetId = request.widgetId
|
||||||
}
|
}
|
||||||
|
|
||||||
window.parent.postMessage({
|
let response
|
||||||
...request,
|
|
||||||
response: request.action === "capabilities" ? {
|
if (request.action === "visibility") {
|
||||||
capabilities: ["m.sticker"],
|
response = {}
|
||||||
} : {
|
} else if (request.action === "capabilities") {
|
||||||
error: { message: "Action not supported" },
|
response = { capabilities: ["m.sticker"] }
|
||||||
},
|
} else {
|
||||||
}, event.origin)
|
response = { error: { message: "Action not supported" } }
|
||||||
|
}
|
||||||
|
|
||||||
|
window.parent.postMessage({ ...request, response }, event.origin)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function sendSticker(content) {
|
export function sendSticker(content) {
|
||||||
|
Loading…
Reference in New Issue
Block a user