Jonas Platte
a20c75d536
Fix import grouping issues
2021-02-25 20:55:19 +01:00
Jonas Platte
cd2c540e92
events: Make Custom* struct rest fields consistent
2021-02-12 11:24:07 +01:00
Jonas Platte
00121bdb4b
Fix inconsistent #[test] module naming
2021-02-02 11:44:30 +01:00
Jonas Platte
e8882fe814
events: Regroup crate-local imports
2020-12-04 21:05:48 +01:00
Damir Jelić
3216edc137
ruma-events: Add support for m.key.verification.done events
2020-12-04 19:53:46 +01:00
Damir Jelić
ce2ab39d71
ruma-events: Add support for m.key.verification.ready events
2020-12-04 19:53:46 +01:00
Damir Jelić
4afafa8b37
ruma-events: Add the majority of in-room verification events
...
This patch adds equivalent in-room versions of the m.key.verfication.*
events we have for to-device events.
The MSC that adds this is found over here:
https://github.com/matrix-org/matrix-doc/pull/2241
2020-12-04 19:53:43 +01:00
Damir Jelić
7ec2b0b555
ruma-events: Create separate to-device content structs
...
While it's possible to share the content between different event types
in the usual case some event types have slightly different contents if
they are sent out as a to-device event vs a room message event.
The canonical example for this are key verification events where the
to-device version has a transaction id field but the room message
version uses event relationships for the same purpose.
This patch makes it possible for to-device events to have different
content structs. Type aliases are used where a common struct can be
used.
2020-12-04 19:48:34 +01:00
Jonas Platte
5562a23aaa
Move Raw, Outgoing and all macro code from ruma-common to ruma-serde
2020-11-28 03:45:39 +01:00
Jonas Platte
e7f55ea2c6
Rewrap comments
2020-11-27 18:22:18 +01:00
Jonas Platte
dd6446822b
Derive PartialEq and Eq for all string-wrapping enums
2020-11-02 00:29:47 +01:00
Jonas Platte
d34a270919
Allow custom values for more enums
2020-11-02 00:29:47 +01:00
Jonas Platte
70a12864ef
Use new macros for existing future-compatible enums
2020-11-02 00:29:41 +01:00
Jonas Platte
e1975c2035
Be more consistent about whitespace
2020-10-24 00:44:01 +02:00
Julian Tescher
c3a074059f
Make custom enum variants doc hidden
2020-09-08 01:06:23 +02:00
Nicholas Young
7ccdaa34d6
feature gate exhaustive types for all spec crates:
...
- ruma-appservice-api
- ruma-client-api
- ruma-events
- ruma-federation-api
2020-09-01 18:39:41 -06:00
Jonas Platte
4a1b6d5607
Use DeviceIdBox in ruma-events, ruma-*-api
2020-08-13 21:19:41 +02:00
Damir Jelić
67a2012b85
ruma-events: Add an init struct for the m.sas.v1 content of the accept event.
2020-07-31 19:28:13 +02:00
Damir Jelić
964893334e
ruma-events: Add the hmac-sha256 MAC method.
2020-07-31 19:28:13 +02:00
Damir Jelić
6513ebd9b0
ruma-events: Rename MSasV1ContentOptions to MSasV1ContentInit.
2020-07-31 19:28:13 +02:00
Damir Jelić
21837d6b8d
ruma-events: Implement TryFrom to for MSasV1Content.
2020-07-31 19:28:13 +02:00
Damir Jelić
afeb328705
ruma-events: Change the structure of the accept event as well.
...
This allows the accept event to contain method specific content similar
to how the start event accepts it.
2020-07-31 19:28:13 +02:00
Damir Jelić
e847ac1ee1
ruma-events: Change the structure of key.verification.start events.
2020-07-31 19:28:13 +02:00
Jonas Platte
4cbdc079b0
Improve string comparison impls
2020-07-22 19:17:24 +02:00
Jonas Platte
b24df92692
Make DeviceId a newtype rather than an alias
2020-07-22 18:59:33 +02:00
skim
b260a13d4b
move and rename ruma_events::json::EventJson to ruma_common::raw::Raw
2020-07-16 07:31:36 -07:00
Damir Jelić
b5b0ca267b
ruma-events: Update the constructor of the start event for the new key agreement.
2020-07-15 12:25:00 +02:00
Damir Jelić
9eb0266cb0
ruma-events: Test the key agreement serialization/deserialization.
2020-07-15 12:23:11 +02:00
Damir Jelić
02d7f8d17b
ruma-events: Expose the content fields of the verification start event publicly.
2020-07-15 12:23:10 +02:00
Damir Jelić
c93cfb986b
ruma-events: Add the new key agreement method.
2020-07-15 12:22:53 +02:00
Jonas Platte
a3e5d679a1
Revert making identifier types generic over the underlying string type
...
At the same time, this commit makes `ServerName` a newtype around str so
other identifier types can borrow out their server name part as a
`&ServerName`. This technique works for `ServerName` because it keeps no
additional metadata. For the other identifier types to support being
created in borrowed form from a string slice, custom DSTs first have to
be added to Rust.
2020-07-14 23:02:51 +02:00
Jonas Platte
8683901e14
Don't to_string() string literals
2020-07-14 22:11:05 +02:00
Jonas Platte
9e04d648ca
events: Make almost all enums non_exhaustive
2020-06-13 00:32:44 +02:00
Jonas Platte
fbf0deacfe
Re-rustfmt ruma-events
2020-06-10 22:17:59 +02:00
Jonas Platte
f304c04d1d
Add 'ruma-events/' from commit '00692d532e26f58d48ead9589dc823403c6e59a5'
...
git-subtree-dir: ruma-events
git-subtree-mainline: d59a616e2c363507a89c92f34aa67e86ee2cfb49
git-subtree-split: 00692d532e26f58d48ead9589dc823403c6e59a5
2020-06-10 22:07:24 +02:00