201 Commits

Author SHA1 Message Date
Kévin Commaille
35da79a26e identifiers: Make DeviceKeyId a type alias of KeyId 2024-11-08 13:13:19 -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
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
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
Kévin Commaille
733ee0d12d api: Remove warnings about types visibility in UI tests 2024-09-07 17:11:13 +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
Kévin Commaille
968c52b117 api: Rename request macro attribute query_map to query_all
Remove its IntoIterator bound to allow to represent
the query fields as a single struct or enum.
2024-06-21 19:15:59 +02:00
Kévin Commaille
d6c4533b7d chore: Fix new warnings 2024-05-12 15:49:28 +02:00
avdb13
8881755235
api: Add status parameter to request attribute macro
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2024-04-24 14:44:49 +02:00
Jonas Platte
5446ea979b
Update trybuild tests
There's a new stable release of Rust, error messages were tweaked.
2023-11-20 20:30:46 +01:00
Jonas Platte
31331f3165
Bring back ruma-events
Co-authored-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-08-28 10:23:54 +02:00
Kévin Commaille
24ce9d5e09 events: Move sanitize HTML features to new ruma-html crate 2023-08-24 14:00:07 +02:00
Ivan Enderlin
ea41901211
events: Transform Markdown soft line breaks into hard line breaks
This patch transforms Markdown soft line breaks into hard line breaks
when rendering to HTML.

The [CommonMark specification about soft line
breaks](https://spec.commonmark.org/0.30/#soft-line-breaks) specifies:

> A renderer may also provide an option to render soft line breaks as
> hard line breaks.

Refering to https://github.com/vector-im/element-x-ios/issues/1418, some
people are expecting to get soft line breaks rendered at hard ones.

This patch updates the Markdown test to include this conversion of soft
to hard line breaks. It includes a list and a code block, to ensure
not _all_ soft breaks are transformed into hard breaks; only the ones
we expect.
2023-08-24 11:12:37 +02:00
Kévin Commaille
d809e6e365
events: Don't filter out any responses if there is no end timestamp 2023-08-23 15:55:56 +00:00
Kévin Commaille
f540004a0d
events: Don't require whole poll response events to compute results
Co-authored-by: Jonas Platte <jplatte@matrix.org>
2023-08-23 09:18:37 +02:00
Jonas Platte
8e10064364 Enforce import grouping
Includes a few manual changes to make rustfmt behave a bit better.
2023-08-22 12:31:49 +02:00
Kévin Commaille
7dee1d64be events: Add method to add mentions instead of replacing them 2023-08-22 12:07:54 +02:00
Kévin Commaille
b2b4c81645 events: Allow to add mentions automatically when generating reply 2023-08-22 12:07:54 +02:00
Kévin Commaille
1701d9a803 events: Make creator field of RoomCreateEventContent optional and RedactedRoomreateEventContent a typedef
According to MSC2175
2023-08-14 15:33:39 +02:00
Kévin Commaille
7a5d9b6e8b events: Add support for redacts key into content of RoomRedactionEvent
According to MSC2174
2023-08-11 15:30:13 +02:00
Kévin Commaille
9bf3e03dd3 events: Add m.relates_to to poll start events 2023-07-27 16:04:58 +02:00
Kévin Commaille
d53362c689 events: Add unstable poll events
Using the unstable format defined in MSC3381
2023-07-27 16:04:58 +02:00
Kévin Commaille
c0b8cd4d46 events: Make polls events use the stable prefixes 2023-07-27 16:04:58 +02:00
Jonas Platte
3dac70ead9
Remove most unreachable visibility modifiers 2023-07-19 14:32:14 +02:00
Jonas Platte
fe010abb22
Update expected trybuild test output 2023-07-14 10:05:00 +02:00
Kévin Commaille
f8ac66ca25 events: Add support for intentional mentions
According to MSC3952
2023-07-10 13:12:17 +02:00
Kévin Commaille
07bc06038f events: Keep data of unknown relations 2023-07-06 17:05:25 +02:00
Kévin Commaille
d0f11f0075 events: Reintroduce MSC3488 fallback behavior in LocationMessageEventContent 2023-06-23 12:41:37 +02:00
Kévin Commaille
e017e65277 events: Improve compatibility of generated and stripped plain reply fallback 2023-06-23 12:32:24 +02:00
Kévin Commaille
9b694cdfa8 events: Add methods to compute poll results 2023-06-23 10:36:23 +02:00
Kévin Commaille
8d2521874d events: Put use behind feature flag 2023-06-23 10:36:23 +02:00
Jonas Platte
c5782ab8aa
Use new owned ID macros throught the codebase 2023-06-20 11:47:50 +02:00
Jonas Platte
e71c224308
Fix expansion of owned identifier creation macros 2023-06-20 11:06:18 +02:00
Jonas Platte
c1fa8d9406
events: Streamline constructors of media event content structs 2023-06-13 17:15:09 +02:00
Jonas Platte
ba5bf8cfce
Replace assert_matches by assert_matches2 2023-06-08 11:37:11 +02:00
Kévin Commaille
07ea09548f events: Stabilize VoIP signalling improvements 2023-06-06 10:44:48 +02:00
Kévin Commaille
3f28f2a6f1 events: Use a string for SessionDescription's type
A clarification in MSC2746 / Matrix 1.7 explains that the `type` field
should not be validated but passed as-is to the WebRTC API.
It
    also avoids an unnecessary conversion between the WebRTC API
and the Ruma type.
2023-05-26 11:45:50 +02:00
Kévin Commaille
60ed2c7b9a events: Add missing version field to CallNegotiateEventContent 2023-05-26 10:55:37 +02:00
Kévin Commaille
2d697fcc95 events: Stabilize annotations and reactions 2023-05-26 09:26:30 +02:00
Kévin Commaille
6df78e8aee events: Move CalCapabilities behind feature unstable-msc2747 2023-05-24 17:53:32 +02:00
Jonas Platte
f45a09e958
Appease clippy 2023-05-24 10:41:24 +02:00
Kévin Commaille
d98903e46c chore: Work around new rustfmt bug 2023-05-04 13:04:57 +02:00
Jonas Platte
25be562036
Update trybuild output 2023-03-10 10:59:52 +01:00
Kévin Commaille
cc47a7268b events: Updates location event types
Even if the MSC hasn't been updated, refactor a bit to match other
extensible events types.
2023-02-27 20:28:38 +01:00
Kévin Commaille
61c23491c6 events: Update types according to changes in MSC3381 2023-02-27 20:28:38 +01:00
Kévin Commaille
fbf99fcc53 events: Update types according to changes in MSC3554 2023-02-27 20:28:38 +01:00
Kévin Commaille
08aa2ca04c events: Update types according to changes in MSC3245 2023-02-27 20:28:38 +01:00
Kévin Commaille
41be6ac18b events: Update types according to MSC3927 and changes in MSC3246 2023-02-27 20:28:38 +01:00
Kévin Commaille
60f754322e events: Update types according to changes in MSC3553 2023-02-27 20:28:38 +01:00
Kévin Commaille
5985bbe803 events: Update types according to changes in MSC3552 2023-02-27 20:28:38 +01:00