803 Commits

Author SHA1 Message Date
strawberry
5194ea1861 Merge remote-tracking branch 'upstream/main' into conduwuit-changes 2024-04-18 19:45:17 -04:00
Benjamin Bouvier
ccc0a64ba3
events: allow deserialize a m.tag's order as an integer (#1767)
Some servers use an integer to represent e.g. `1` for the order, instead of the double representation (that would be `1.` or `1.0)`. This makes it possible to parse such values as integers too, since they're technically not double. Implementing `visit_u64` and `visit_i64` covers all the smaller sizes too, so I've implemented only that here.
2024-04-18 09:15:27 +00:00
strawberry
580eefe1c6 Merge remote-tracking branch 'upstream/main' into conduwuit-changes 2024-04-07 11:04:24 -04:00
Kévin Commaille
31dc4a2dfb
client-api: Add support for the Retry-After header
According to MSC4041 / Matrix 1.10

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2024-04-07 13:52:43 +00:00
strawberry
a938640491 add MSC3026 support (busy presence status)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-05 17:48:02 -04:00
Jonas Platte
4a02b97aa3
Update website URL 2024-04-04 13:20:58 +02:00
Hubert Chathi
c5f8137ba9
ruma: Export web_time as time 2024-03-27 18:48:55 +01:00
Kévin Commaille
0e7c91d789 docs: Point links to v1.10 of the spec 2024-03-22 21:28:39 +01:00
Kévin Commaille
041d871781 api: Add MatrixVersion::V1_10 2024-03-22 21:28:39 +01:00
Hubert Chathi
4c00bd010d
Also use Duration and UNIX_TIME from web-time crate 2024-03-21 15:20:03 +01:00
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
Jonas Platte
95707b86c3 Provide a more helpful Debug impl for timestamps 2024-03-16 00:23:31 +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
76c58b143a push: Don't use deprecated methods 2024-02-14 13:07:21 +01:00
Kévin Commaille
b7829d5607 Fix test 2023-12-26 17:28:43 +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
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
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
e8bc589e52
Transition to type privacy lints 2023-11-09 09:50:04 +01:00
Jonas Platte
c82f600d6a
Fix new lints 2023-11-08 18:16:44 +01:00
Jonas Platte
db06702a0f
ci: Upgrade nightly toolchain 2023-11-08 18:03:26 +01:00
Jonas Platte
e658b8b128
Remove 'www.' from ruma.io URLs 2023-10-12 15:44:00 +02:00
Jonas Platte
7cee1787a2
Release ruma-common 0.12.0 2023-10-05 11:21:46 +02:00
Jonas Platte
a5d62dca22
identifiers: Rename room_or_room_alias_id module to match the type 2023-09-28 16:44:16 +02:00
Jonas Platte
cf1c7b0b12
identifiers: Simplify implementation of RoomOrAliasId::variant 2023-09-28 16:43:37 +02:00
Jonas Platte
d78f56e85c
identifiers: Test server_name function in room_id tests 2023-09-28 16:43:16 +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
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
Jonas Platte
10f651916f
identifiers: Add a compat flag to allow arbitrary-length IDs 2023-09-27 16:33:53 +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
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
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