Jason Volk
ac37db212a
fix lints
...
Signed-off-by: Jason Volk <jason@zemos.net>
2025-01-01 22:20:39 +00:00
Jason Volk
30a08ff7be
various identifiers macro optimizations
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-12-28 23:43:56 +00:00
Jason Volk
54da128bbe
refactor owned identifiers using SmallVec
2024-12-28 01:06:09 +00:00
Jason Volk
9bdc048cdb
various inlines
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-12-19 14:02:45 +00:00
strawberry
a204cb56db
remove stupid skip_serializing_if on push rulesets
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-12-15 15:13:13 -05:00
Kévin Commaille
b1790e05ce
push: Allow to add custom data for pushers
...
Due to a clarification in the spec.
2024-12-15 03:10:09 -05:00
Kévin Commaille
f05d0e03a1
api: Disallow #[serde(flatten)] for single-body-fields of requests and responses
...
`#[ruma_api(body)]` must be used instead.
2024-12-15 03:07:49 -05:00
Kévin Commaille
fb273553b5
identifiers: Allow to set ruma_identifiers_storage cfg setting with env variable
2024-12-15 02:55:58 -05:00
Jason Volk
c1f5f3f20b
optimize PL deserialization
...
add generalized map_as_vec deserializer
Signed-off-by: Jason Volk <jason@zemos.net>
2024-12-03 13:43:30 +00:00
Kévin Commaille
13a546056e
chore: Remove unnecessary lifetimes
2024-11-29 17:45:04 -05:00
Kévin Commaille
9c9b1f7e93
serde: Improve docs of Raw
2024-11-29 17:36:37 -05: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
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
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
Kévin Commaille
cc1b2144ea
chore: Point links to v1.12 of the spec
2024-10-19 14:59:08 -04:00
Kévin Commaille
56b400b832
api: Add MatrixVersion::V1_12
2024-10-19 14:59:02 -04:00
Charles Hall
0286bcfa2f
api: allow constructing MatrixErrorBody::NotJson
2024-10-19 14:58:44 -04: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
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
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
strawberry
b6f82a72b6
Merge remote-tracking branch 'upstream/main' into conduwuit-changes
2024-09-13 16:35:24 -04: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
strawberry
11155e576a
Merge remote-tracking branch 'upstream/main' into conduwuit-changes
2024-09-07 12:20:19 -04: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
strawberry
c8a2d06e24
Merge remote-tracking branch 'upstream/main' into conduwuit-changes
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-09-06 21:10:32 -04: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
Jason Volk
1de0f493e8
downgrade deprecation warns into debug_warns
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-28 15:41:56 +00:00
Jason Volk
a0cc9a80dd
add missing impl of PartialEq on media::Method
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-27 00:34:57 +00:00
Jason Volk
25fbd64b96
fix str to mxc conversion; add convenience OwnedMxcUri conversion
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-16 06:35:50 +00:00
Jason Volk
2d2deb4ca7
structured Mxc type
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-16 00:37:51 +00:00
Jason Volk
3f06ade0fd
Revert "Revert "optimize for optional static response headers zero-copy zero-alloc""
...
This reverts commit 6bdc5ad326029e84fe05ed2591d9ba442bab8ff5.
Revert "Revert "Fix assumptions about header value types""
This reverts commit 03037f6c92ffb43388022d288e5a36f20a8559dd.
2024-08-15 05:20:21 +00:00
strawberry
69b2bc4b8c
Merge remote-tracking branch 'upstream/main' into conduwuit-changes
2024-08-14 01:47:43 -04:00
Kévin Commaille
04654f8833
chore: Fix new clippy warnings
2024-07-29 20:03:44 +02:00