tinkering
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 28s Details

This commit is contained in:
Ladd Hoffman 2024-04-25 18:11:16 -05:00
parent 9b44c5bf21
commit 5b086aab9d
1 changed files with 18 additions and 14 deletions

View File

@ -261,14 +261,14 @@ function Widget() {
// widgetApi.current.requestCapability(MatrixCapabilities.AlwaysOnScreen);
widgetApi.current.requestCapabilities([
WidgetEventCapability.forRoomEvent(
EventDirection.Send,
'm.message',
),
]);
// widgetApi.current.requestCapabilities([
// WidgetEventCapability.forRoomEvent(
// EventDirection.Send,
// 'm.message',
// ),
// ]);
widgetApi.current.updateRequestedCapabilities();
// widgetApi.current.updateRequestedCapabilities();
widgetApi.current.on('ready', (e) => {
console.log('WIDGET READY', e);
@ -365,13 +365,17 @@ function Widget() {
// TODO: Sign and send a message to the forum-api bot / to a room in matrix
const registerMatrixIdentity = async () => {
// await widgetApi.current.requestCapabilities([
// WidgetEventCapability.forRoomEvent(
// EventDirection.Send,
// 'm.message',
// ),
// ]);
await widgetApi.current.sendRoomEvent('m.message', 'test message', '!HMoNkuTRLqQGhhlMNO:matrix.dgov.io');
const sendMessageCapability = WidgetEventCapability.forRoomEvent(
EventDirection.Send,
'm.message',
);
widgetApi.current.requestCapability(sendMessageCapability);
await widgetApi.current.updateRequestedCapabilities();
if (widgetApi.current.hasCapability(sendMessageCapability)) {
await widgetApi.current.sendRoomEvent('m.message', 'test message', '!HMoNkuTRLqQGhhlMNO:matrix.dgov.io');
} else {
console.log('Widget has not been granted the send message capability');
}
};
/* -------------------------------------------------------------------------------- */