Skip to content

WidgetDriver: Add to-device widget driver support (without encryption) #4963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: toger5/widget-filter-refactor
Choose a base branch
from

Conversation

toger5
Copy link
Contributor

@toger5 toger5 commented Apr 23, 2025

The widget Driver should be able to send and receive to-device events. This is useful for element call encryption keys.

This PR focusses on the widget driver and machine logic. To send/communicate the events from the widget to the driver.

It skips any encryption logic. Some of the encryption logic will be part of crypto crate and the code in the widget driver crate should be kept minimal once the crypto crate is ready.

@toger5 toger5 force-pushed the toger5/widget-filter-refactor branch from 9f38056 to 9504745 Compare April 23, 2025 09:18
@toger5 toger5 force-pushed the toger5/widget-to-device-without-encryption branch from f6bd24a to 16171b6 Compare April 23, 2025 09:19
@toger5 toger5 changed the title WidgetDriver: Add to-device widget driver support WidgetDriver: Add to-device widget driver support (without encryption) Apr 23, 2025
toger5 added 5 commits April 23, 2025 16:52
A new widget filter is required to add support for to-device events.
This allows to let the widget only send and receive to-device events it has negotiated capabilities for.
It consists of the following changes:
 - add a `NotifyNewToDeviceEvent` ToWidget request (a request that will be sent to the widget from the client when the client receives a widget action over the widget api)
 - add the `SendToDeviceRequest` (driver request that will be sent from the widget and asks the driver to send a ToDevice event)
 - add the ToDeviceActions to the required enums: `IncomingMessage`(machine), `MatrixDriverResponse`, `FromWidgetResponse`, `FromWidgetRequest`, `MatrixDriverRequestData`
… events via cs api)

This also hooks up the widget via the machine actions. And adds toDevice events to the subscription.
@toger5 toger5 force-pushed the toger5/widget-to-device-without-encryption branch from 16171b6 to 3445127 Compare April 23, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant