request capability on start
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 42s
Details
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 42s
Details
This commit is contained in:
parent
83d43b8312
commit
ab103d3038
|
@ -277,6 +277,13 @@ function Widget() {
|
|||
});
|
||||
|
||||
widgetApi.current.start();
|
||||
|
||||
const sendMessageCapability = WidgetEventCapability.forRoomEvent(
|
||||
EventDirection.Send,
|
||||
'm.room.message',
|
||||
);
|
||||
widgetApi.current.requestCapability(sendMessageCapability.raw);
|
||||
widgetApi.current.updateRequestedCapabilities();
|
||||
}, []);
|
||||
|
||||
/* -------------------------------------------------------------------------------- */
|
||||
|
@ -363,12 +370,6 @@ function Widget() {
|
|||
|
||||
// TODO: Sign and send a message to the forum-api bot / to a room in matrix
|
||||
const registerMatrixIdentity = async () => {
|
||||
const sendMessageCapability = WidgetEventCapability.forRoomEvent(
|
||||
EventDirection.Send,
|
||||
'm.room.message',
|
||||
);
|
||||
widgetApi.current.requestCapability(sendMessageCapability.raw);
|
||||
await widgetApi.current.updateRequestedCapabilities();
|
||||
if (widgetApi.current.hasCapability(sendMessageCapability)) {
|
||||
await widgetApi.current.sendRoomEvent('m.message', 'test message', '!HMoNkuTRLqQGhhlMNO:matrix.dgov.io');
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue