request a capability
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 38s
Details
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 38s
Details
This commit is contained in:
parent
8cc14bc7d5
commit
bc4b9f6a5b
|
@ -10,7 +10,9 @@ import Container from 'react-bootstrap/Container';
|
|||
import Row from 'react-bootstrap/Row';
|
||||
import Col from 'react-bootstrap/Col';
|
||||
import Stack from 'react-bootstrap/Stack';
|
||||
import { WidgetApi, EventDirection, WidgetEventCapability } from 'matrix-widget-api';
|
||||
import {
|
||||
WidgetApi, EventDirection, WidgetEventCapability, MatrixCapabilities,
|
||||
} from 'matrix-widget-api';
|
||||
// import { MuiCapabilitiesGuard } from '@matrix-widget-toolkit/mui';
|
||||
// import { useWidgetApi } from '@matrix-widget-toolkit/react';
|
||||
|
||||
|
@ -255,6 +257,15 @@ function Widget() {
|
|||
|
||||
widgetApi.current = new WidgetApi();
|
||||
|
||||
widgetApi.current.requestCapability(MatrixCapabilities.AlwaysOnScreen);
|
||||
|
||||
// widgetApi.current.requestCapabilities([
|
||||
// WidgetEventCapability.forRoomEvent(
|
||||
// EventDirection.Send,
|
||||
// 'm.message',
|
||||
// ),
|
||||
// ]);
|
||||
|
||||
widgetApi.current.on('ready', (e) => {
|
||||
console.log('WIDGET READY', e);
|
||||
});
|
||||
|
@ -356,7 +367,7 @@ function Widget() {
|
|||
'm.message',
|
||||
),
|
||||
]);
|
||||
widgetApi.current.sendRoomEvent('m.message', 'test message');
|
||||
await widgetApi.current.sendRoomEvent('m.message', 'test message');
|
||||
};
|
||||
|
||||
/* -------------------------------------------------------------------------------- */
|
||||
|
|
Loading…
Reference in New Issue