Jonas Platte
561db87b64
widget: Add integration tests for sending events
2023-10-19 15:25:53 +02:00
Jonas Platte
4982f87c59
widget: Add support for send-event fromWidget requests
...
Co-authored-by: Daniel Abramov <daniel.abramov@element.io >
2023-10-19 15:25:53 +02:00
Jonas Platte
14cf923361
widget: Add tests for event reading requests
2023-10-19 13:01:57 +02:00
Jonas Platte
3ce7126d58
widget: Add support for read-state-event fromWidget requests
...
Co-authored-by: Daniel Abramov <daniel.abramov@element.io >
2023-10-19 13:01:57 +02:00
Jonas Platte
946976a561
widget: Add EventFilter::matches_state_event_with_any_state_key
2023-10-19 13:01:57 +02:00
Jonas Platte
e58ee3bcf1
widget: Fix copy-paste comment error
2023-10-19 13:01:57 +02:00
Jonas Platte
c0985942dd
widget: Actually add request ID to process_from_widget_request span
2023-10-19 13:01:57 +02:00
Jonas Platte
3b4108e519
widget: Add Deserialize impl for StateKeySelector
2023-10-19 13:01:57 +02:00
dependabot[bot]
70524e2f5c
build(deps): bump rustix from 0.37.24 to 0.37.25
...
Bumps [rustix](https://github.com/bytecodealliance/rustix ) from 0.37.24 to 0.37.25.
- [Release notes](https://github.com/bytecodealliance/rustix/releases )
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.37.24...v0.37.25 )
---
updated-dependencies:
- dependency-name: rustix
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-10-19 11:58:24 +02:00
Jonas Platte
d5bda8147f
ffi: Remove _blocking functions
...
Except for full_room_blocking, which is apparently noticably faster.
They were only added as a workaround for a UniFFI bug that has now been
fixed.
2023-10-19 07:56:06 +02:00
Jonas Platte
02a0916bc2
widget: Rename "permissions" to "capabilities"
...
… to match the postMessage JSON API.
2023-10-18 18:17:31 +02:00
Jonas Platte
01ec91bda4
widget: Rename Capabilities to CapabilitiesState
...
… and move the None case into it to avoid having to wrap it in Option.
2023-10-18 18:17:31 +02:00
Jonas Platte
12db7516ef
widget: Add get_supported_api_versions support
...
Co-authored-by: Timo K <timok@element.io >
2023-10-18 15:52:00 +00:00
Jonas Platte
af71d831c6
Fix 'verifying' typos
2023-10-18 17:50:51 +02:00
Daniel Abramov
b623c7c357
widget: Complete ContentLoaded implementation
...
And cover it with tests.
2023-10-18 16:44:03 +02:00
Mauro Romito
5f0e5c7407
added the with_mentions method
2023-10-18 15:42:14 +02:00
Jonas Platte
2c80307e53
widget: Add content_loaded initialization
2023-10-18 15:03:58 +02:00
Jonas Platte
1aef675a97
widget: Fix a small error in test code
2023-10-18 15:03:58 +02:00
Jonas Platte
ea36eaa09a
widget: Implement fromWidget response sending
...
… and send an error response when the request fails to deserialize.
2023-10-18 15:03:58 +02:00
Jonas Platte
9c71c2b733
widget: Rename process_message_from_widget to process_widget_message
...
… to make it clearer that it's not specifically about fromWidget messages.
2023-10-18 15:03:58 +02:00
Jonas Platte
46a8f4e841
widget: Clean up json! indentation in test
2023-10-18 15:03:58 +02:00
Daniel Abramov
eb5f05d8c5
widget: Add missing driver requests
2023-10-18 14:44:46 +02:00
Jonas Platte
29fc3d0289
widget: Shorten tracing instrument args
2023-10-18 13:26:51 +02:00
Daniel Abramov
04fcc0bb87
widget: split parsing of common widget header
2023-10-18 13:26:51 +02:00
Daniel Abramov
77bae6f421
widget: add a note to the error handling
2023-10-18 13:26:51 +02:00
Daniel Abramov
a99cb7c30f
widget: move things around in function (chore)
...
So that most important functions (public interface) come first.
2023-10-18 13:26:51 +02:00
Daniel Abramov
6363cd5902
widget: extract capability negotiation into fn
...
We will need to re-use it when processing the `ContentLoaded` message
from a widget.
2023-10-18 13:26:51 +02:00
Jonas Platte
541c0ef559
widget: Add an integration test for immediate capability negotiation
2023-10-18 12:34:34 +02:00
Jonas Platte
65cc926612
widget: Add more tracing events
2023-10-18 12:34:34 +02:00
Jonas Platte
c550fa80a7
widget: Coalesce matrix driver response messages into an enum
2023-10-18 12:34:34 +02:00
Jonas Platte
5113d6e161
widget: Don't alias ruma request type
2023-10-18 12:34:34 +02:00
Jonas Platte
f910d10f6b
widget: Rename Event -> IncomingMessage
2023-10-18 12:34:34 +02:00
Jonas Platte
29620144fe
widget: Split up Machine::process and add more sanity checks
2023-10-18 12:34:34 +02:00
Daniel Abramov
deff0a06f5
widget: Implement capability negotiation
2023-10-18 12:34:34 +02:00
Jonas Platte
e038ced2c6
widget: Add toWidget & MatrixDriver response handling skeleton
2023-10-18 12:34:34 +02:00
Richard van der Hoff
f75b2cd1d0
Documentation on /keys/query parsing functions ( #2674 )
...
These functions are a bit confusing, so I wrote some comments. I also factored out
`get_user_signing_key_from_response`, to reduce duplication and (IMHO) improve clarity.
2023-10-17 16:55:26 +01:00
Jonas Platte
7c4046e463
widget: Implement requesting of capabilities w/o init_on_content_load
2023-10-17 16:55:02 +02:00
Jonas Platte
a4cc28f94a
widget: Rename client module to machine
2023-10-17 16:55:02 +02:00
Jonas Platte
de0543c2e2
widget: Rename settings#id to widget_id
2023-10-17 16:55:02 +02:00
Jonas Platte
4a1e4cd279
widget: Rename ClientApi to WidgetMachine
2023-10-17 16:55:02 +02:00
Jonas Platte
a812f17ec4
widget: Clarify MatrixDriver's purpose
2023-10-17 16:55:02 +02:00
Jonas Platte
7c958498bf
ui: Raise log level for prev_batch wait timeout
...
… since it can cause rather annoying problems with the SS proxy
if it happens.
2023-10-17 11:02:15 +02:00
Jonas Platte
06e3fc4235
widget: Add a failing (ignored) test for reading room messages
2023-10-17 10:54:51 +02:00
Jonas Platte
07951b88d3
widget: Separate reading of message and state events
...
… and use the state store for the latter.
Co-authored-by: Timo K <timok@element.io >
2023-10-17 10:54:51 +02:00
Jonas Platte
5775a6e628
widget: Group trait impls in client::outgoing
2023-10-17 10:54:51 +02:00
Jonas Platte
20021abee3
widget: Fix clippy warning
2023-10-17 10:54:51 +02:00
Jonas Platte
b3f37459b7
widget: Reduce visibility on widget::matrix types and their methods
2023-10-17 10:54:51 +02:00
Jonas Platte
8496673310
sdk: Move WidgetSettings constructor to top of impl block
2023-10-17 10:54:51 +02:00
Richard van der Hoff
3c9f48dcb5
common: Add a tracing MakeWriter for writing to a JS Logger
...
Replace the old `tracing_subscriber::layer::Layer` with a `MakeWriter` which
can then be plugged into a `fmt::Subscriber`.
2023-10-16 20:10:41 +02:00
Jonas Platte
7f3fef5d8b
ci: Run documentation CI workflow when un-drafting a PR
2023-10-16 15:44:20 +02:00