5521 Commits

Author SHA1 Message Date
Kévin Commaille
a9267360cb client-api: Add support for account locking
According to MSC3939.
2024-09-29 11:11:18 +02:00
Jonas Platte
9f8cdecae6
Upgrade outdated dependencies 2024-09-29 10:42:39 +02:00
Kévin Commaille
b7059ddd18 federation-api: Allow old_verify_keys to be missing when deserializing ServerSigningKeys 2024-09-28 21:21:42 +02:00
Kévin Commaille
12a2e9342b client-api: Add m.get_login_token capability
According to a clarification in the spec.
2024-09-28 20:34:46 +02:00
Ivan Enderlin
85b412ffed
client-api: sync::v5::Request::timeline_limit is not optional. (#1914)
Contrary to MSC3575, MSC4186 has `timeline_limit` which is not optional.

This patch changes `timeline_limit: Option<UInt>` to `Int` directly.
2024-09-27 08:17:02 +02:00
Ivan Enderlin
463904db31
client-api: Remove sync::v5::Response::initial. (#1913)
This patch removes the `initial` field from the `Response` for
MSC4186. There is no top-level `initial` value. This field exists for
`response::Room` though.
2024-09-27 08:16:47 +02:00
Ivan Enderlin
c06af4385e
client-api: Add unstable-msc4186 inside the CHANGELOG.md. (#1911) 2024-09-24 09:30:31 +02:00
Timo
1ae98db9c4 changelog: Document device_id type change 2024-09-17 12:07:49 +02:00
Timo
92110cabb5 events: Use DeviceId instead of String. 2024-09-17 12:07:49 +02:00
Timo
1298c1d690 events: Fixing comments for new method. 2024-09-17 12:07:49 +02:00
Benjamin Lee
61f5150358
federation-api: allow multipart body without preceding CRLF on first boundary
RFC 2046[1] is somewhat ambiguous on whether or not it's valid to omit the
preceding CRLF for the first boundary. The prose on page 19 suggests
that it is not:

> The boundary delimiter MUST occur at the beginning of a line, i.e.,
> following a CRLF, and the initial CRLF is considered to be attached
> to the boundary delimiter line rather than part of the preceding
> part. The boundary may be followed by zero or more characters of
> linear whitespace. It is then terminated by either another CRLF and
> the header fields for the next part, or by two CRLFs, in which case
> there are no header fields for the next part. If no Content-Type
> field is present it is assumed to be "message/rfc822" in a
> "multipart/digest" and "text/plain" otherwise.
>
> NOTE: The CRLF preceding the boundary delimiter line is conceptually
> attached to the boundary so that it is possible to have a part that
> does not end with a CRLF (line break). Body parts that must be
> considered to end with line breaks, therefore, must have two CRLFs
> preceding the boundary delimiter line, the first of which is part of
> the preceding body part, and the second of which is part of the
> encapsulation boundary.

But the BNF on page 22 suggests that it is, as long as there is no
preamble:

> dash-boundary := "--" boundary
>                  ; boundary taken from the value of
>                  ; boundary parameter of the
>                  ; Content-Type field.
>
> multipart-body := [preamble CRLF]
>                   dash-boundary transport-padding CRLF
>                   body-part *encapsulation
>                   close-delimiter transport-padding
>                   [CRLF epilogue]

Dendrite currently generates multipart responses without a preceding CRLF
for the first boundary[2], which were rejected by the previous ruma
parsing logic.

[1]: https://datatracker.ietf.org/doc/html/rfc2046
[2]: https://github.com/matrix-org/dendrite/issues/3414
2024-09-17 10:45:04 +02:00
Benjamin Lee
92a35381b5
client-api: fix build when unstable-msc4168 feature is disabled (#1910)
Without this feature, the v5 module does not exist.
2024-09-16 08:17:11 +02:00
Ivan Enderlin
7cfa3be0c6
client-api: Implement MSC4186. (#1907)
* client-api: Derive `Default` for `v4::SyncList`.

* client-api: Implement MSC4186.
2024-09-12 07:12:49 +00:00
Timo
d92404d114
events: introduce custom StateKey type for call member state events 2024-09-12 08:28:06 +02:00
Jonas Platte
1a138ed6c9 Use workspace lint configuration instead of rustflags hack 2024-09-11 07:13:32 +00:00
Jonas Platte
7051892077 Move integration tests one directory level deeper
… and rename from tests to it (integration tests).
This allows enabling the mod_module_files lint everywhere again.
2024-09-11 07:13:32 +00:00
Jonas Platte
56e56485cd docs: Link to examples repo from main readme 2024-09-10 17:18:01 +00:00
Jonas Platte
b1632fd07c Remove examples from the repository
They have moved into their own repo.
2024-09-10 17:18:01 +00:00
Kévin Commaille
9e418105ff ci: Upgrade actions 2024-09-10 18:52:49 +02:00
Johannes Marbach
0c00b90b22
client-api: Replace server_name with via in knock_room and join_room_by_id_or_alias
According to MSC4156

Co-authored-by: Kévin Commaille <76261501+zecakeh@users.noreply.github.com>
2024-09-09 11:26:23 +02:00
Kévin Commaille
8f288cc1f2 events: Replace deprecated lint in UI test 2024-09-07 17:11:13 +02:00
Kévin Commaille
733ee0d12d api: Remove warnings about types visibility in UI tests 2024-09-07 17:11:13 +02:00
Kévin Commaille
9203934fd7 serde: Improve docs for Raw<T> 2024-09-07 17:10:18 +02:00
Kévin Commaille
a56787e506 chore: Fix new clippy lint
The new lint that is handled here is
too_long_first_doc_paragraph.
2024-09-07 17:10:18 +02:00
Kévin Commaille
bafb5c60c0 ci: Bump the version of Rust nightly 2024-09-07 17:10:18 +02:00
Jonas Platte
4547da0b7b Fix CI by changing where deprecations are added and allowed 2024-09-07 14:31:24 +00:00
Jonas Platte
6a049c93a1 macros: Fix METADATA references in generated tests 2024-09-07 14:31:24 +00:00
Jonas Platte
83acca397b macros: Fix test cfg in macro output 2024-09-07 14:31:24 +00:00
Jonas Platte
037e37c5e7 ci: Exclude ruma-macros feature from stable-all 2024-09-07 07:57:30 +00:00
Jonas Platte
43abef7e1f ci: Update MSRV jobs
- Fix msrv-all enabling ruma-macros' nightly-only feature
- Test ruma-client in msrv-all, remove separate job
2024-09-07 07:57:30 +00:00
Jonas Platte
0e8388abab macros: Add __internal_macro_expand feature for better RA macro expansion 2024-09-07 07:57:30 +00:00
Jonas Platte
79025dfca4 macros: Improve internal assertions 2024-09-07 07:57:30 +00:00
Jonas Platte
de6b08a2b5 macros: Simplify internal derive macro input parsing 2024-09-07 07:57:30 +00:00
Kévin Commaille
88f56b0e00 html: Upgrade html5ever
Requires a complete change of the HTML tree, to have interior mutability
and be able to return borrowed data from a Handle.
It is now a Rc-based tree where each node has a weak reference to
its parent and strong references to its children.

This results ina few breaking changes to the public API.
2024-09-07 09:56:02 +02:00
Kévin Commaille
dac38e4e17 events: Improve markdown syntax detection
We also detect backslash escapes and entity references.
2024-09-06 09:59:47 +02:00
Kévin Commaille
0ea496b138 events: Upgrade pulldown-cmark 2024-09-06 09:59:47 +02:00
Kévin Commaille
d568d579ad html: Remove support for name attribute
According to MSC4159.
2024-09-06 09:21:24 +02:00
morguldir
d6890ef00c client-api: use a RoomTypeFilter for syncv3 (not_)room_types filters
Signed-off-by: morguldir <morguldir@protonmail.com>
2024-09-05 19:48:18 +00:00
morguldir
f1fbfb12ea client-api: use RoomType for syncv3 filters instead of strings
(cherry picked from commit 5b2ce304010d7c4d1dc1b53af5d49eb1171422ed)
Signed-off-by: morguldir <morguldir@protonmail.com>
2024-09-05 19:48:18 +00:00
Timo
642c981f99
MatrixRTC: fix call member parsing by using the correct focus_active format. (#1888)
`focus_select` -> `focus_selection`
2024-08-21 17:51:12 +02:00
Andrew Ferrazzutti
82417e3940
events: Loosen type of call member event state keys
Allow MSC3401-style call membership state events to have state keys that
are arbitrary strings, and not just pure MXIDs.

This allows for state keys that are suffixed with the sender's device
ID, as well as ones prefixed by an underscore to bypass auth rules over
state keys that start with a `@` but do not strictly equal an MXID.
2024-08-10 09:41:46 +02:00
Kévin Commaille
04654f8833 chore: Fix new clippy warnings 2024-07-29 20:03:44 +02:00
Kévin Commaille
6087f7efbb ci: Bump nightly version 2024-07-29 20:03:44 +02:00
Timo
878d2b287b
events: update future endpoints and rename future to delay
To match the latest version of the MSC
2024-07-29 16:38:38 +02:00
Kévin Commaille
14d7415f0d client-api: Do not send request body for logout and logout_all
Due to a clarification in the spec.
2024-07-16 20:21:29 +02:00
Kévin Commaille
e815eb7603 federation-api: Add support for authenticated media endpoints
According to MSC3916 / Matrix 1.11.
2024-07-16 15:02:45 +02:00
Kévin Commaille
9e8008f011 chore: Make rand a workspace dependency 2024-07-16 15:02:45 +02:00
Kévin Commaille
586668806e client-api: Move some media types and helpers to ruma-common
Without breaking changes.
2024-07-16 15:02:45 +02:00
Kévin Commaille
f9ae582b27 chore: Make bytes a workspace dependency 2024-07-16 15:02:45 +02:00
Kévin Commaille
463f89b0eb client-api: Add a type for the Content-Disposition HTTP header 2024-07-14 12:28:48 +02:00