132ikl
21f46520d9
events: Move m.relates_to to EncryptedEventContent
2021-04-27 08:07:28 +02:00
Jonas Platte
d6ff0e8e28
Replace /latest URLs
2021-04-13 18:03:07 +02:00
Jonas Platte
499c615f55
events: Clean up some comments
2021-04-13 12:35:25 +02:00
Jonas Platte
58b8797961
events: Remove custom event relations from public API
2021-04-13 12:35:13 +02:00
Kévin Commaille
19e849a82a
docs: Document uses of the unstable-pre-spec feature flag
2021-04-12 11:31:01 +02:00
Jonas Platte
2803ee3721
events: Add public API for custom / unsupported message types
2021-04-11 12:08:31 +02:00
Kévin Commaille
d3ee7c4d74
docs: Fix some wording issues
2021-04-07 16:55:59 +02:00
Kévin Commaille
154f9b2d58
docs: Document compat feature uses
2021-04-07 12:47:44 +02:00
Kévin Commaille
2f406e63a4
docs: Add missing doc_cfg
2021-04-07 12:17:36 +02:00
Jonas Platte
b4da6b784a
Replace non-renaming uses of serde_json::{from_str, to_string}
2021-04-05 13:33:59 +02:00
Kévin Commaille
c6ab610451
events: Replace String with MxcUri for media URLs
2021-04-05 08:10:21 +02:00
Jonas Platte
69bece2a40
events: Fix construction of non-exhaustive struct in tests
2021-03-31 13:26:47 +02:00
Jonas Platte
4a926e0e64
Consistently use int!
macro to create js_int::Int
s from literals
2021-03-31 13:25:56 +02:00
Kévin Commaille
cdb998c83f
Move ruma_events::room::power_levels::NotificationPowerLevels to ruma-common
2021-03-31 12:12:23 +02:00
Adam Blanchet
2e422c5d81
Create ImageInfo struct specific to AvatarEventContent
...
Add a new specific ImageInfo struct, with all the same fields,
except for `thumbnail_file`, to disallow encrypted room avatars.
Resolves : #397
2021-03-31 11:00:36 +02:00
Takayuki Maeda
9cfa3b075c
deserialize empty string to none for avatar_url
2021-03-15 16:46:15 +01:00
Jonas Platte
a20c75d536
Fix import grouping issues
2021-02-25 20:55:19 +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
Akshay
a76d3e24a4
events: Support m.room.message
events with custom msgtype
s
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
0a10afe6da
Move m.room.message tests from src/ to tests/
2021-02-08 12:49:46 +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
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
Amanda Graven
85037832d1
Minor comment spelling and formatting fixes
2021-01-18 16:12:28 +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
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
Damir Jelić
9b87fdda12
ruma-events: Allow encrypted megolm events to contain a relation
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ć
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
Jonas Platte
c322bd4d1e
events: Feature-gate reactions
...
and make relationships module public. The re-export idea doesn't make
sense with annotations being used in both reactions and messages.
2020-11-24 03:25:02 +01:00
Jonas Platte
60d12470c9
events: Allow missing fields in m.room.third_party_invite under unstable-synapse-quirks
2020-11-23 19:32:28 +01:00
Jonas Platte
634c3f1ee5
events: Allow m.room.tombstone without a body under unstable-synapse-quirks
2020-11-23 19:31:44 +01:00
Jonas Platte
ee4280cea2
events: Allow the url in m.room.avatar to be null / missing
...
This isn't allowed in any version of the spec, but it's the only way to
unset an avatar and will have to be supported in the future.
C.f. https://github.com/matrix-org/matrix-doc/issues/2006
2020-11-23 14:18:41 +01:00
Jonas Platte
0ae0a89467
events: Remove accidentally copy-pasted docs line
2020-11-23 14:15:54 +01:00
Alejandro Domínguez
d16fd4b2c1
Enable support in power level events for old Synapse events with strings
2020-11-20 14:31:10 +01:00
Jonas Platte
9a4206b1b2
events: Add a test for edit deserialization without unstable-pre-spec
2020-11-18 14:13:15 +01:00
Damir Jelić
cf7d4b40e1
events: Add support for the new relation types
2020-11-10 13:30:52 +01:00
Jonas Platte
374603f51c
Rename SigningKeyId to ServerSigningKeyId
2020-11-08 19:24:48 +01:00