5628 Commits

Author SHA1 Message Date
Jason Volk
b57e03e342 impl Serialize for ContentDisposition
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-09 01:16:00 +00:00
Jason Volk
c3f21813ca impl Serialize for Mxc using Display/to_string() for now
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-09 01:16:00 +00:00
Jason Volk
f485a0265c Support let sender: &UserId = value.get("sender").try_into()?;
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-03 01:59:24 +00:00
strawberry
7f345bf39d fix building without unstable-msc2409 feature
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-02 21:52:14 -04:00
strawberry
e81ed2741b add room reporting as per MSC4151
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-01 23:49:00 -04:00
strawberry
0738b7f72d Merge remote-tracking branch 'upstream/main' into conduwuit-changes
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-01 10:46:37 -04:00
strawberry
e2d576677e add missing receive_ephemeral appservice registration bool as part of MSC2409
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-01 10:29:20 -04:00
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
strawberry
ade2f1daf0 Merge remote-tracking branch 'upstream/main' into conduwuit-changes 2024-09-28 17:09:18 -04: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
Jason Volk
e7db44989d async state-res
Signed-off-by: Jason Volk <jason@zemos.net>
2024-09-24 22:58:36 +00:00
Jason Volk
1d0b06b581 fix tests for ContentDisposition macro support
Signed-off-by: Jason Volk <jason@zemos.net>
2024-09-24 19:21:09 +00:00
Jason Volk
bb93521103 fix tests for structured Mxc
Signed-off-by: Jason Volk <jason@zemos.net>
2024-09-24 19:21:09 +00:00
Ivan Enderlin
c06af4385e
client-api: Add unstable-msc4186 inside the CHANGELOG.md. (#1911) 2024-09-24 09:30:31 +02:00
Jason Volk
d8d9d2030d Make state_res interface iterators +Send
Signed-off-by: Jason Volk <jason@zemos.net>
2024-09-21 00:46:57 +00:00
Jason Volk
e9e9a88fc4 bump rustfmt edition
Signed-off-by: Jason Volk <jason@zemos.net>
2024-09-21 00:37:55 +00:00
Jason Volk
5873bbd53e Make state-res Error +Send
Signed-off-by: Jason Volk <jason@zemos.net>
2024-09-21 00:37:55 +00:00
strawberry
9900d06765 Merge remote-tracking branch 'upstream/main' into conduwuit-changes 2024-09-17 17:55:49 -04: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
strawberry
b6f82a72b6 Merge remote-tracking branch 'upstream/main' into conduwuit-changes 2024-09-13 16:35:24 -04: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
strawberry
25c6d8b2ad cargo fmt
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-09-09 22:40:40 -04:00
strawberry
f621b318c5 support generic KV pairs of MSC4133
still GET/PUT/DELETE for now

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-09-09 22:40:32 -04: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
strawberry
11155e576a Merge remote-tracking branch 'upstream/main' into conduwuit-changes 2024-09-07 12:20:19 -04:00
morguldir
b432789838 use RoomTypeFilter instead of Option<RoomType>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-09-07 12:19:59 -04: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
strawberry
b003338b90 Merge remote-tracking branch 'upstream/main' into conduwuit-changes 2024-09-07 08:18:57 -04:00
Jonas Platte
037e37c5e7 ci: Exclude ruma-macros feature from stable-all 2024-09-07 07:57:30 +00:00