5338 Commits

Author SHA1 Message Date
Jonas Platte
dad3c70d9d
events: Fix missing re-export of new unstable types 2023-09-12 15:53:07 +02:00
Jonas Platte
a8180722f4
events: Add support for voice messages as implemented by Element Web 2023-09-12 10:20:38 +02:00
Kévin Commaille
b4853aa8fa events: Add method on RoomMessageEventContent to apply a replacement 2023-09-04 14:11:33 +02:00
gnieto
f29317f9d7
Forward unstable-exhaustive-types flag from ruma to ruma-events 2023-09-04 13:46:21 +02:00
Kévin Commaille
e4a46437c9 html: Add note about errors in Html::parse docs 2023-08-29 11:19:48 +02:00
Kévin Commaille
ba973c98f1 html: Expose sanitize API on Html 2023-08-29 11:19:48 +02:00
Kévin Commaille
0120861951 html: Don't expose methods to manipulate HTML
Users should just use the provided way to sanitize HTML
2023-08-29 11:19:48 +02:00
Kévin Commaille
80c71ef454 html: Rename Fragment to Html 2023-08-29 11:19:48 +02:00
Kévin Commaille
9d0f23c8a7 canonical-json: Apply redaction rules of MSC3821 2023-08-29 09:23:44 +02:00
Kévin Commaille
5d68ba3ff4 canonical-json: Apply redaction rules of MSC3989 2023-08-29 09:23:44 +02:00
Kévin Commaille
37d2b2b12f canonical-json: Apply redaction rules of MSC2176 2023-08-29 09:23:44 +02:00
Kévin Commaille
2ef75a572c canonical-json: Allow to preserve all keys and nested keys 2023-08-29 09:23:44 +02:00
Kévin Commaille
bb6edd26bb canonical-json: Apply the redaction rules of latest room version by default 2023-08-29 09:23:44 +02:00
Jonas Platte
399adc911f Use as_variant crate for shorter code 2023-08-28 19:31:39 +02:00
Jonas Platte
ed03c0d2fa federation-api: Simplify pdu_process_response::serialize 2023-08-28 19:31:39 +02:00
Benjamin Bouvier
d3245c287b
client-api: Allow receiving read receipts for all subscribed rooms in sync::v4
Given "rooms: '*'", the sliding sync proxy will return read receipts for all the subscribed rooms at any
time. This patch adds safe static support for this option, still allowing individual room ids too.
2023-08-28 18:26:43 +02: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
Jonas Platte
fec7d23cfd
ci: Remove pointless job
It was running no tests.
2023-08-25 10:36:25 +02:00
Jonas Platte
ba2914a22a
macros: Simplify symbol path 2023-08-25 10:36:25 +02:00
Jonas Platte
c7a3c4e4fc
Upgrade ed25519-dalek to 2.0
Co-authored-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-08-24 20:48:54 +02:00
Jonas Platte
b8fdea9b18
Clean up usage of feature = "rand" in tests 2023-08-24 16:36:56 +02:00
Jonas Platte
9009ec6c3e
identifiers: Fix clippy lint 2023-08-24 15:37:05 +02:00
Jonas Platte
b6f915b480
events: Remove duplicate / unused RemoveReplyFallback enum 2023-08-24 15:36:56 +02:00
Kévin Commaille
4ac0ae1392 macros: Implement AsRef<{id}> for {id} 2023-08-24 14:57:57 +02:00
Kévin Commaille
24ce9d5e09 events: Move sanitize HTML features to new ruma-html crate 2023-08-24 14:00:07 +02:00
Kévin Commaille
acfeb38e90 docs: Update spec links to point to v1.8 2023-08-24 12:16:29 +02:00
Kévin Commaille
729c1fb6e4 ci: Add support for Matrix 1.8 links 2023-08-24 12:16:29 +02:00
Kévin Commaille
c8bbcecdc8 docs: Update changelogs for Matrix 1.8 2023-08-24 12:16:29 +02:00
Kévin Commaille
7f0ca5eaa8 api: Add support for Matrix 1.8 2023-08-24 12:16:29 +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
Jonas Platte
73b6113819
Rename test modules to tests
… for consistency.
2023-08-24 10:36:30 +02:00
Jonas Platte
88cc7600b4
Remove wildcard import in test module 2023-08-24 10:03:00 +02:00
Jonas Platte
a47df86ade
events: Don't parse markdown twice 2023-08-24 09:43:32 +02:00
Jonas Platte
d66c07b1fa
events: Simplify parse_markdown 2023-08-24 09:43:23 +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
c652461ae7 xtask: Ignore non-text files in spec links check 2023-08-23 16:55:57 +02:00
Kévin Commaille
2753577d02 signatures: Add test to check reproducibility of signatures 2023-08-23 16:55:57 +02: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
Kévin Commaille
533da2aded canonical-json: Allow to converted (Sync)RoomRedactionEvent to RedactedBecause
With room version 11, even a redacted event has a redacts field.
2023-08-22 13:32:40 +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
3fe6ba7f52 events: Use a BTreeSet for Mentions' user_ids field
Avoids to serialize duplicate IDs
2023-08-22 12:07:54 +02:00
Kévin Commaille
8bdfd809e4 identifiers-validation: Allow + in the localpart of user IDs
According to MSC4009
2023-08-21 11:02:57 +02:00
Ivan Enderlin
a9a6e67ed0
client-api: Add timestamp onto SlidingSyncRoom
This has been added in
https://github.com/matrix-org/sliding-sync/pull/247. This is not part of
the MSC yet.
2023-08-17 11:52:00 +02:00
Kévin Commaille
6fcd813201 events: Preserve signed in third_party_invite in RedactedRoomMemberEventContent
According to MSC3821
2023-08-16 14:55:42 +02:00
Kévin Commaille
ce13fdb3a7 events: Preserve invite in RedactedRoomPowerLevelsEventContent
According to MSC2176
2023-08-16 14:55:42 +02:00
Jonas Platte
eeacf27183
Add missing space 2023-08-15 17:23:07 +02:00
Kévin Commaille
afd8f2f652 state-res: Add RoomVersion::V11
According to MSC3820
2023-08-14 17:23:17 +02:00
Kévin Commaille
bcae4e5799 chore: Use .is_some_and(…) instead of .map_or(false, …) 2023-08-14 16:17:25 +02:00