5655 Commits

Author SHA1 Message Date
Kévin Commaille
278a45aec8 events: Remove p tag around inline markdown
As recommended by the spec.
2024-11-07 18:52:56 -05:00
Charles Hall
c3fb396352 state-res: improve tracing spans and events
* Make use of tracing's structured logging features
* Change some wording to align with the spec
2024-11-07 18:52:02 -05:00
Charles Hall
35e459d86e state-res: fix tiebreaking comparisons
`node` needs to be swapped with `parent` here, otherwise the
`power_level` and `age` in a `TieBreaker` inserted on the following line
are always equal, because both sides are the values for `node` rather
than a different value of `parent` on each iteration, and so the only
thing that could possibly be different is the `event_id` because that's
correctly set to `parent`. This is why I was observing tiebreaks always
being sorted by `event_id` and experiencing incorrectly resolved states.
2024-11-07 18:42:10 -05:00
Jason Volk
8ce5d8eb87 reserve outgoing request headers
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-30 05:40:07 +00:00
strawberry
dd8b13ed2f
add unspecced r0 routes to more key endpoints
may solve https://github.com/element-hq/element-ios/issues/5974
on conduwuit

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-28 16:40:53 -04:00
strawberry
39c1addd37
implement MSC4210, add missing .m.rule.contains_user_name check
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-26 15:55:42 -04:00
Jason Volk
d96d981475 Make to_cow_str() for event types public as at least some hedge against unconditional to_string().
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 02:44:06 +00:00
strawberry
9f6c48eea2
add MSC2815 support, query param and error codes
https://github.com/matrix-org/matrix-spec-proposals/pull/2815

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-19 18:30:44 -04:00
Neek
1c4eeb4c41 events: Add relates_to field on StickerEventContent 2024-10-19 14:59:29 -04:00
Kévin Commaille
5627c5109e federation-api: Remove KeyObject
It is unused and is actually supposed to be the same type
as `ruma_common::encryption::SignedKey`.
2024-10-19 14:59:22 -04:00
Kévin Commaille
60b92e8e1d events: Stabilize support for marked unread room account data
The unstable `com.famedly.marked_unread` room account data is still
available behind the `unstable-msc2867` cargo feature to be able to
migrate data from the unstable to the stable prefix.
2024-10-19 14:59:15 -04:00
Kévin Commaille
f0b76f2295 chore: Mention Matrix 1.12 in changelog 2024-10-19 14:59:11 -04:00
Kévin Commaille
cc1b2144ea chore: Point links to v1.12 of the spec 2024-10-19 14:59:08 -04:00
Kévin Commaille
aae40393bb xtask: Allow links to v1.12 of the spec 2024-10-19 14:59:06 -04:00
Kévin Commaille
56b400b832 api: Add MatrixVersion::V1_12 2024-10-19 14:59:02 -04:00
Kévin Commaille
1aa2eadd70 client-api: Remove RuleScope
The `global` scope is hardcoded due to a clarification in the spec.
2024-10-19 14:58:59 -04:00
Kévin Commaille
9abafb284a events: Fix indentation in changelog 2024-10-19 14:58:54 -04:00
Doug
4a5d7d0e7a events: Add filename helper methods for audio, file, image and video messages. 2024-10-19 14:58:49 -04:00
Doug
e0db68241d events: Add helpers for media captions to audio, file, image and video messages 2024-10-19 14:58:46 -04:00
Charles Hall
0286bcfa2f api: allow constructing MatrixErrorBody::NotJson 2024-10-19 14:58:44 -04:00
Charles Hall
7a8ca45bbe client-api: allow constructing ErrorBody::NotJson 2024-10-19 14:58:40 -04:00
strawberry
506b340302 add r0 endpoint to PUT /_matrix/client/r0/room_keys/keys
there's no reason to be needlessly pessimistic, they are
functionally the same.

see https://github.com/element-hq/hydrogen-web/issues/741

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-16 14:57:41 -04:00
Jason Volk
d7baeb7e5c add required_keys util to signatures
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-14 03:54:43 +00:00
Jason Volk
90fb81eabe reduce excessive cloning for verify_json
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-10 01:27:04 +00:00
Jason Volk
eb93c641ab gate ruma_common::http_headers under feature api
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-10 01:27:04 +00:00
Jason Volk
3109496a1f expose MAX_BYTES as an associated constant for identifiers
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-09 10:34:00 +00:00
Jason Volk
c434098fb1 Improve validation error for empty mxid.
Previously an empty MXID was reported as MissingLeadingSigil but a more
concise variant is just Empty.

Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-09 10:34:00 +00:00
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