request register identity capability
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 32s Details

This commit is contained in:
Ladd Hoffman 2024-04-26 19:23:15 -05:00
parent a204ec7f6f
commit 527c844ad0
1 changed files with 6 additions and 1 deletions

View File

@ -279,7 +279,12 @@ function Widget() {
EventDirection.Send,
'm.room.message',
);
const sendRegisterIdentityCapability = WidgetEventCapability.forRoomEvent(
EventDirection.Send,
'io.dgov.identity.register',
);
widgetApi.current.requestCapability(sendMessageCapability.raw);
widgetApi.current.requestCapability(sendRegisterIdentityCapability.raw);
widgetApi.current.updateRequestedCapabilities();
});
@ -368,6 +373,7 @@ function Widget() {
setShowViewPost(true);
}, [setViewPost, setShowViewPost]);
// Sign and send a message
const registerMatrixIdentity = useCallback(async () => {
const message = new Date().toISOString();
@ -376,7 +382,6 @@ function Widget() {
params: [message, account],
});
// TODO: Sign and send a message
await widgetApi.current.sendRoomEvent('io.dgov.identity.register', {
message,
signature,