Jonas Platte
00ee6030c0
identifiers: Remove unnecessary as_str calls from room_id tests
2023-09-28 16:43:16 +02:00
Kévin Commaille
4ef6d1641b
push: Fix poll push rules IDs
2023-09-28 13:06:16 +02:00
Kévin Commaille
c12f2f4002
push: Update poll push rules
...
According to MSC3930
2023-09-28 11:46:38 +02:00
Damir Jelić
1b6240286f
common: Allow padding when decoding the Base64
type from a string
2023-09-20 10:28:57 +00:00
Kévin Commaille
31ae99cf52
Add support for suppress edits push rule
...
According to MSC3958
2023-09-15 13:33:07 +02:00
Kévin Commaille
369cf8629e
push: Move PredefinedOverrideRuleId::Reaction
...
To have the same order as when the rules are included in the ruleset
2023-09-15 13:33:07 +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
31331f3165
Bring back ruma-events
...
Co-authored-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-08-28 10:23: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
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
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
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
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
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
bcae4e5799
chore: Use .is_some_and(…) instead of .map_or(false, …)
2023-08-14 16:17:25 +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
cf70f74fb7
events: Make sure matches with RoomVersionId default to behavior of latest room version
...
Avoids forgetting to update the match if nothing changed since the last version.
2023-08-10 13:26:52 +02:00
Kévin Commaille
9a5bc6d8c3
identifiers: Add initial support for room version 11
2023-08-09 19:09:19 +02:00
Jonas Platte
bb20ba0711
Fix new clippy lint
2023-07-31 10:28:39 +02:00
Jonas Platte
37cbb4ea56
identifiers: Discourage proc-macro imports even more
...
Unfortunately it seems impossible to prevent rust-analyzer from
suggesting them before the `macro_rules!` macros, but this should be a
decent hint for users that importing them is not a good idea.
2023-07-29 11:53:38 +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
Kévin Commaille
df11c6d46a
events: Provide type for historical m.message
content block instead of serde helper
2023-07-27 16:04:58 +02:00
Ivan Enderlin
201f0027d4
feat: Add SlidingSyncRoom::avatar
...
It's been recently added in the specification, 50ae2c8d65
...kegan/sync-v3.
2023-07-26 16:02:28 +02:00
Jonas Platte
3dac70ead9
Remove most unreachable visibility modifiers
2023-07-19 14:32:14 +02:00
Jonas Platte
ffc271f3ec
push: Re-export ScalarJsonValue
...
It was part of the public interface already, but not nameable.
2023-07-19 13:58:35 +02:00
Jonas Platte
20d38e1622
events: Add From<MessageType> for RoomMessageEventContentWithoutRelation
2023-07-12 11:58:22 +02:00
Jonas Platte
9cf1257142
events: Add RoomMessageEventContentWithoutRelation::new
2023-07-12 11:40:21 +02:00
Kévin Commaille
f8ac66ca25
events: Add support for intentional mentions
...
According to MSC3952
2023-07-10 13:12:17 +02:00