197 Commits

Author SHA1 Message Date
Jonas Platte
4ced423612
Fix new clippy warnings 2021-03-01 18:38:41 +01:00
Jonas Platte
a20c75d536
Fix import grouping issues 2021-02-25 20:55:19 +01:00
Andi
6b0bf53601
events: Add message event serialization test 2021-02-18 19:12:58 +01:00
Jonas Platte
e659df73a1
Fix m.room.message serialization 2021-02-18 00:56:32 +01:00
Devin Ragotzy
12c294422b
Move new_content and relates_to fields to MessageEventContent struct
MessageEventContent used to be an enum, it now has a msgtype field where
the enum (now called MessageType) sits.
2021-02-13 00:29:07 +01:00
Jonas Platte
798cd49e9e
events: Use more specific MessageEvent type in room_message test 2021-02-12 20:09:34 +01:00
Akshay
a76d3e24a4
events: Support m.room.message events with custom msgtypes 2021-02-12 14:01:10 +01:00
Akshay
704e5f89f5
events: Replace serde(tag) by serde(untagged) for MessageEventContent
in preparation for adding a variant for custom `msgtype`s.
2021-02-12 14:01:10 +01:00
Akshay
526542c246
events: Replace derived Deserialize for MessageEventContent with a manual impl
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2021-02-12 14:00:57 +01:00
Jonas Platte
317b2055a8
events: Fix tests for unstable-pre-spec 2021-02-12 13:41:54 +01:00
Jonas Platte
cd2c540e92
events: Make Custom* struct rest fields consistent 2021-02-12 11:24:07 +01:00
Akshay
6bbb42303b
Add event_type accessor method to event enums 2021-02-11 12:48:33 +01:00
Jonas Platte
0a10afe6da
Move m.room.message tests from src/ to tests/ 2021-02-08 12:49:46 +01:00
Akshay
8fadffa31d
events-macros: Use lookahead1 instead of parse().is_ok() 2021-02-06 18:23:40 +01:00
Jonas Platte
7846142690
events: Allow state_key to be empty in InitialStateEvent 2021-02-06 15:15:57 +01:00
Jonas Platte
891db9083b
Clean up cargo features 2021-02-02 19:21:45 +01:00
Jonas Platte
00121bdb4b
Fix inconsistent #[test] module naming 2021-02-02 11:44:30 +01:00
Akshay
adeb545062
Add push rule for .m.rule.reaction 2021-01-21 19:51:32 +01:00
Tilo Spannagel
8c109d3c0a
Add constructor for markdown formatted messages behind a feature flag
Signed-off-by: Tilo Spannagel <development@tilosp.de>
2021-01-21 15:53:03 +01:00
Jonas Platte
5dd3658324
Fix nightly CI 2021-01-18 16:22:43 +01:00
Amanda Graven
85037832d1
Minor comment spelling and formatting fixes 2021-01-18 16:12:28 +01:00
Jonas Platte
ca1f334ded
Remove documentation links from all Cargo.tomls
It was wrong for ruma-federation-api and useless for all others since
crates.io will link to docs.rs automatically if no link is given.
2021-01-17 17:00:09 +01:00
V02460
f5a0add846
Support reactions in an event's unsigned field 2021-01-10 00:47:50 +01:00
Jonas Platte
6f4d883e88
Fix integer literals in PDU tests
They were using a usize suffix which was only valid on 64bit targets.
2021-01-04 01:58:23 +01:00
Jonas Platte
3b37d77394
Clean up changelogs 2021-01-02 15:01:49 +01:00
Jonas Platte
b95ab27272
Release ruma-events 0.22.0-alpha.2 2021-01-02 14:49:00 +01:00
Jonas Platte
ecfb8a4a4d
Relase ruma-common 0.3.0-alpha.1 2021-01-02 14:34:17 +01:00
Jonas Platte
6d468b88a3
Release ruma-identifiers-validation 0.2.0 and ruma-identifiers 0.18.0-alpha.1 2021-01-02 13:31:08 +01:00
Jonas Platte
2ebd827355
Release ruma-serde 0.3.0 2021-01-02 13:04:39 +01:00
Jonas Platte
19ae6ff347
Remove lots of Copy implementations
so we don't have do breaking releases once they can't be Copy anymore.
2020-12-24 02:51:08 +01:00
Jonas Platte
f55e2b2cc6
Bump dependency requirements 2020-12-24 02:48:01 +01:00
Jonas Platte
3989e52844
Upgrade js_int to 0.2.0 2020-12-24 01:53:30 +01:00
Devin Ragotzy
724a48d616
Add examples to the docs of Raw and the ruma-events module 2020-12-07 17:57:23 +01:00
David Vo
1a4e9aa20a
Implement MSC2448: BlurHashes for media
This exposes the pre-FCP unstable prefixed fields in MSC2448.
2020-12-07 13:01:15 +01:00
strct
018adf0819
Fix typo in docs 2020-12-07 10:51:41 +01:00
Jonas Platte
e8882fe814
events: Regroup crate-local imports 2020-12-04 21:05:48 +01:00
Damir Jelić
9b87fdda12
ruma-events: Allow encrypted megolm events to contain a relation 2020-12-04 19:53:46 +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ć
e0adcaa502
ruma-events: Add the key verification room message variant 2020-12-04 19:53:45 +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
1ceade7b61
identifiers: Add more crypto-related types
Co-authored-by: Isaiah Inuwa <isaiah.inuwa@gmail.com>
2020-12-02 13:11:28 +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
6c4bd7c72c
events: Allow m.new_content to change the message type 2020-11-26 17:52:08 +01:00
Jonas Platte
48d1c97475
events: Add rudimentary support for m.new_content 2020-11-25 18:40:48 +01:00
Jonas Platte
1f14cb0393
events: Simplify html constructors for text & notice message event contents 2020-11-25 18:40:16 +01:00
Jonas Platte
199f5840dd
events: Make text & notice message event content non-exhaustive 2020-11-25 18:38:14 +01:00
Jonas Platte
abc18fae39
Fix some links in documentation 2020-11-24 03:25:02 +01:00