Charles Hall
e31b9dd3a4
state-res: refactor tiebreaking logic for clarity
2024-11-29 17:35:08 -05:00
strawberry
97e2fb6df1
state-res: fix allow knock -> leave on same state_key and sender
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-11-20 22:57:53 -05:00
strawberry
d1f635764e
state-res: fix incorrect knock join_rule checks
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-11-20 19:34:39 -05:00
strawberry
82ebed457a
correct MSC3266 room_version and encryption response fields
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-11-20 16:30:02 -05:00
strawberry
8c323cf6e6
clarify confusing knock event auth warning
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-11-19 19:07:47 -05:00
Charles Hall
aff5d8532f
state-res: improve tracing spans and events
...
slight modifications, mainly just restricting these to
debug log level to prevent incurring the overhead of
the instruments, and tiny adjustments for async state res
Co-authored-by: strawberry <strawberry@puppygock.gay>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-11-19 19:07:42 -05:00
strawberry
cf31b8798f
add more missing unspecced r0 endpoints, fix silly upload_signatures struct
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-11-19 19:00:37 -05:00
Mathieu Velten
2ab432fba1
ruma-events: Accept any string as a key for m.direct
account data
2024-11-15 12:23:29 -05:00
Jason Volk
8cade7a14f
client-api: add rooms/initialSync support
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-11-13 01:23:17 +00:00
Jason Volk
f674006487
state-res: update benches for async
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-11-10 21:03:40 +00:00
Jason Volk
4546be5c8e
state-res: fix changed Signatures type in bench code
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-11-10 20:38:13 +00:00
Jason Volk
dcf6d7e04a
ensure uses of canonical-json are property gated
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-11-09 06:27:02 +00:00
Andy Balaam
67ffedabbf
identifiers: Tweak doc tests to use fewer imports
2024-11-08 13:14:51 -05:00
Andy Balaam
8581f30075
identifiers: Fix compile errors in doctests
2024-11-08 13:14:46 -05:00
Andy Balaam
12f4a56ace
identifiers: Remove 'rust' from code blocks
2024-11-08 13:14:40 -05:00
Andy Balaam
c471070933
identifiers: Improve doctest layout and use type aliases
2024-11-08 13:14:36 -05:00
Andy Balaam
9ff70228d8
identifiers: Add doc tests for algorithm and key_name
2024-11-08 13:14:33 -05:00
Andy Balaam
a765bcdd1a
identifiers: Documentation for the KeyId struct
2024-11-08 13:14:30 -05:00
Andy Balaam
5db68816a9
identifiers: Make KeyId::key_name take the string after the colon, not before
2024-11-08 13:14:20 -05:00
Kévin Commaille
807b278dab
federation-api: Use Signatures in more places
2024-11-08 13:13:40 -05:00
Kévin Commaille
f87f388280
events: Use Signatures in more places
2024-11-08 13:13:37 -05:00
Kévin Commaille
5ed3718310
client-api: Use Signatures in more places
2024-11-08 13:13:33 -05:00
Kévin Commaille
0d1d549cf6
encryption: Use Signatures for the key types
2024-11-08 13:13:29 -05:00
Kévin Commaille
eb57bb2797
identifiers: Fix the bounds for Clone, Serialize and Deserialize on Signatures
2024-11-08 13:13:25 -05:00
Kévin Commaille
35da79a26e
identifiers: Make DeviceKeyId a type alias of KeyId
2024-11-08 13:13:19 -05:00
Kévin Commaille
7f8f89eff7
identifiers: Differentiate signing keys from device keys
...
Use OwnedCrossSigningKeyId, OwnedDeviceSigningKeyId and
OwnedCrossSigningOrDeviceSigningKeyId instead of OwnedDeviceKeyId
to identify signing keys.
2024-11-08 13:13:15 -05:00
Kévin Commaille
09ff0b2819
identifiers: Differentiate one-time and fallback keys from device keys
...
Move the `DeviceKeyAlgorithm::SignedCurve25519` into the new
`OneTimeKeyAlgorithm` type.
Add `(Owned)OneTimeKeyId` and `(Owned)OneTimeKeyName` instead of using
`(Owned)DeviceKeyId`.
2024-11-08 13:02:19 -05:00
Kévin Commaille
263ddb6545
identifiers: Improve API of Signatures
...
Implement `Deref` and `DerefMut` to `BTreeMap`.
Implement `From`, `Extend` and `FromIterator` from a list of
`(entity, key_identifier, value)` tuples
Rename `Signatures::insert` to `Signatures::insert_signature`
to let `Signatures::insert` dereference to `BTreeMap::insert`.
2024-11-08 12:49:57 -05:00
Kévin Commaille
ae3897cad8
identifiers: Allow to validate KeyId with any key name type
...
Use new trait bounds for KeyId to only allow specific types.
Change the KeyId validation to be generic over the key name type.
Remove the KeyName type and replace it with the more specific
ServerSigningKeyVersion.
2024-11-08 12:49:53 -05:00
Jonas Platte
f47733b49d
Upgrade html5gum
2024-11-07 19:09:53 -05:00
Jonas Platte
90022bd57c
Upgrade thiserror
2024-11-07 19:09:50 -05:00
Kévin Commaille
f753a2f326
events: Improve markdown parsing code
...
Loop through the events only once to detect both whether there is
markdown and whether the markdown is inline.
Fix more cases of false negatives in markdown detection, like
whitespaces that are removed or the string beginning by a backslash
escape.
2024-11-07 18:59:47 -05:00
Benjamin Kampmann
01ffae2ac2
events: Implement url previews as per MSC4095
2024-11-07 18:55:43 -05:00
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