You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Request capabilities (e.g. ability to take snapshots) from widgets.
This commit is contained in:
@ -383,6 +383,20 @@ export default class WidgetMessaging extends MatrixPostMessageApi {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
getCapabilities() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.exec({
|
||||
api: "widget_client",
|
||||
action: "capabilities",
|
||||
}).then(function(response) {
|
||||
// console.warn("got capabilities", response.capabilities);
|
||||
resolve(response.capabilities);
|
||||
}).catch((error) => {
|
||||
reject(Error("Failed to get capabilities: " + error.message));
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user