Damir Jelić
ccd3b81557
Use web-time to return a SystemTime that works under WASM
...
The `MilliSecondsSinceUnixEpoch::to_system_time()` method returns the
`SystemTime` type from the standard library.
The `std::time::SystemTime::elapsed()` method sadly panics under WASM.
Instead of returning the `SystemTime` from the standard library we're
now returning a drop-in replacement of this type coming from the web-time
crate.
2024-03-20 12:19:18 +01:00
Matthias Ahouansou
bbf81544f2
api: support for appservice-exclusive authentication
2024-03-13 22:06:58 +01:00
Kévin Commaille
f652cbb60f
api: Add support for optional authentication
2024-03-07 12:30:28 +01:00
Kévin Commaille
00f8a6743b
push: Allow to deserialize Ruleset with missing fields
...
According to the Matrix Specification, no field is required.
2023-12-26 17:28:43 +01:00
Kévin Commaille
56d8a59c1b
push: Add accessor for the RuleKind of Predefined{*}RuleId
2023-12-05 10:56:36 +01:00
Kévin Commaille
ba75b09a45
push: Implement AsRef<str> for PredefinedRuleId
2023-12-05 10:56:36 +01:00
Kévin Commaille
90d3605b87
push: Make power levels optional in PushConditionRoomCtx
2023-12-03 13:03:06 +01:00
Kévin Commaille
4efca6fba5
docs: Point links to v1.9 of the spec
2023-11-30 14:42:14 +01:00
Kévin Commaille
ac2f725bcc
api: Add support for Matrix 1.9
2023-11-30 14:42:14 +01:00
Kévin Commaille
b4133b7863
push: Stabilize support for MSC3958
2023-11-30 14:37:17 +01:00
Jonas Platte
5d7c1f5330
Release ruma-common 0.12.1
2023-11-16 10:43:15 +01:00
Kévin Commaille
9b07772d1a
push: Allow to deserialize (New)ConditionalPushRule without conditions
2023-11-15 15:10:42 +01:00
Jonas Platte
7cee1787a2
Release ruma-common 0.12.0
2023-10-05 11:21:46 +02:00
Jonas Platte
984cbda962
identifiers: Don't require room IDs to contain a server name
...
Room IDs being splittable into localpart and servername does not have
much inherent value and there are proposals like MSC4051¹ that propose
changing the format. Relaxing the rules makes Ruma forwards-compatible
with those proposals. The server_name accessor is kept because it is
used by at least one downstream, but is updated to return an `Option`.
¹ https://github.com/matrix-org/matrix-spec-proposals/pull/4051
2023-09-28 16:43:16 +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
e11d30934b
events: Move changelog entries from ruma-common to ruma-events
2023-09-15 12:54:48 +02:00
Kévin Commaille
9d0f23c8a7
canonical-json: Apply redaction rules of MSC3821
2023-08-29 09:23:44 +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
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
c8bbcecdc8
docs: Update changelogs 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
Kévin Commaille
b2b4c81645
events: Allow to add mentions automatically when generating reply
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
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
f8ac66ca25
events: Add support for intentional mentions
...
According to MSC3952
2023-07-10 13:12:17 +02:00
Benjamin Bouvier
2c8ece6bf2
events: Parse TagInfo::order
as a f64 or a stringified f64
2023-07-06 14:34:43 +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
07ea09548f
events: Stabilize VoIP signalling improvements
2023-06-06 10:44:48 +02:00
Kévin Commaille
b1680bd398
push: Link to the spec for dot-separated path definition
2023-05-30 16:38:55 +02:00
Kévin Commaille
766fba75f9
push: Add support for intentional mentions push rules
...
According to MSC3952
2023-05-26 14:39:58 +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
2d697fcc95
events: Stabilize annotations and reactions
2023-05-26 09:26:30 +02:00
Kévin Commaille
0bec1ad507
push: Stabilize event_property_contains
2023-05-26 09:26:09 +02:00
Kévin Commaille
b8668f863b
push: Stabilize event_property_is
2023-05-26 09:26:09 +02:00
Kévin Commaille
dc68190adc
api: Add initial support for Matrix 1.7
2023-05-25 19:28:33 +02:00
Kévin Commaille
6a77b4c9e4
push: Remove the DontNotify and Coalesce variants of push::Action
...
According to MSC3987.
2023-05-04 13:44:54 +02:00
Kévin Commaille
b50037affc
events: Implement sanitize on MessageType
2023-04-27 19:19:37 +02:00
Jonas Platte
1224dd3810
events: Add more convenient power level action checks to RoomPowerLevels
2023-04-27 12:20:11 +02:00
Jonas Platte
1229fa4461
events: Add FullStateEventContent::redact
2023-04-11 16:16:32 +02:00
Kévin Commaille
2ccc0323f6
push: Add support for event_property_contains push condition
...
According to MSC3966
2023-04-11 16:12:05 +02:00
Kévin Commaille
2e7b67bb23
push: Add support for event_property_is push condition
...
According to MSC3758
2023-04-11 16:12:05 +02:00
Kévin Commaille
33fa1b48ed
push: Collect a bigger subset of JSON values in FlattenedJson
2023-04-11 16:12:05 +02:00
Kévin Commaille
ef374ea6b0
push: Escape dots and backslashes in field name for event_match condition
...
According to MSC3873
2023-04-11 11:18:20 +02:00
Kévin Commaille
8eea3e0549
push: Enable by default .m.rule.tombstone
push rule
...
As defined in the spec.
2023-03-14 12:01:40 +01:00
Kévin Commaille
0596e46045
events: Add method to construct RoomEncryptionEventContent with the recommended defaults
2023-03-10 11:13:37 +01:00
Jonas Platte
4eb5033dd0
events: Add utility functions for InitialStateEvent
2023-03-09 18:58:56 +01:00
Jonas Platte
5aa0f29935
identifiers: Add AsRef<[u8]> impls for ID types
2023-03-07 11:06:34 +01:00
Kévin Commaille
ba296ec466
push: Add method to remove a user-defined push rule from a Ruleset
2023-03-02 11:30:48 +01:00