165 Commits

Author SHA1 Message Date
Jonas Platte
e41abbb56b
events: Implement Redact for event structs
… it was only implemented for the enums before.
2021-10-02 01:19:36 +02:00
Jonas Platte
edbd5a696c
events: Use inline code blocks instead of emphasis for type strings 2021-10-01 18:35:01 +02:00
Jonas Platte
0101e110f8
Rename *ToDeviceEventContent structs to ToDevice*Content 2021-10-01 16:48:45 +02:00
Jonas Platte
120f1f3b2a
events: Generate event type aliases 2021-09-30 00:47:13 +02:00
Amanda Graven
3b5f3cb5a6
events: Move JoinRulesEventContent.allow into JoinRules 2021-09-28 13:39:58 +00:00
Jonas Platte
27a3e70465
events: Don't return body as part of MessageType::data 2021-09-27 13:01:50 +02:00
Jonas Platte
af250cf108
Merge JsonObject type aliases 2021-09-27 12:55:31 +02:00
Jonas Platte
fde518ea89
events: Adjust docs for MessageType::data 2021-09-27 12:52:47 +02:00
Jonas Platte
8b44f279c8
Use server_name! macro in tests 2021-09-23 20:33:45 +02:00
Jonas Platte
83b66ab8c2
Add allow to JoinRulesEventContent
Co-authored-by: Amanda Graven <amanda@amandag.net>
2021-09-20 20:34:53 +02:00
Jonas Platte
2bf17fd727
events: Further clean up tests 2021-09-19 19:10:52 +02:00
Jonas Platte
4ec9f1aa03
events: Require MessageType to always contain a body 2021-09-17 19:09:17 +02:00
ftilde
a875f39648
events: Fix quoting of multiline fallback messages
Previously, a '> ' was prepended only to the first line of the quoted
message.
2021-09-11 23:31:15 +02:00
Jonas Platte
46c7e3f811
Clean up and rewrap documentation comments 2021-08-27 21:32:02 +02:00
Jonas Platte
c13737af04
Copy new spec description of MemberEventContent#reason 2021-08-27 10:06:14 +02:00
Jonas Platte
a81880c68f
events: Rework Relation serde
Relation types now implement `Deserialize`, `Serialize`.
2021-08-21 15:20:15 +02:00
Jonas Platte
6177bfccef
events: Add missing ctor / From impl for EncryptedToDeviceEventContent 2021-08-11 21:08:24 +02:00
Jonas Platte
b2b8265ded
events: Split EncryptedEventContent in two 2021-08-11 18:54:25 +02:00
Jonas Platte
202fc5132a
events: Remove deprecated method NameEventContent::name 2021-08-11 17:06:42 +02:00
Adam
63411165da
Move RoomName to ruma-identifiers and use it more 2021-08-10 15:22:47 +02:00
Jonas Platte
6ee3955483
Remove most deprecated items 2021-08-10 15:22:46 +02:00
Jonas Platte
d213ee4718
events: Remove / replace previous error types 2021-08-10 15:22:45 +02:00
Adam
976f90a1a2
events: Add RoomName struct to room::name 2021-08-10 15:22:26 +02:00
Devin Ragotzy
db755f994e
events: Make all pub enums non_exhaustive 2021-08-10 15:22:26 +02:00
Jonas Platte
7a61c9cd8c
Remove trait derives other than Debug from Init structs 2021-08-10 15:22:26 +02:00
Adam Blanchet
13af2e235d
client-api: Implement reasons for leaving a room 2021-08-05 21:04:14 +02:00
Jonas Platte
6236b024fd
events: Fix new_content serialization in the plain-text part of m.encrypted 2021-07-26 13:52:49 +02:00
Devin Ragotzy
3101be1f99
Add macro-braces, disallowed-type and import-rename clippy lints 2021-07-22 14:34:30 +02:00
Adam
118ea0f85a
Update endpoints for blurhash implementation
* Add blurhash to profile and avatar endpoints.
* Add `blurhash` fields to `GET /_matrix/federation/v1/query/profile`
  and `m.room.member`.
* Add `generate_blurhash` field to `PUT /_matrix/media/r0/upload`
2021-07-04 18:38:06 +02:00
Jonas Platte
61671f4440
events: Add event relation conversions 2021-06-20 19:34:29 +02:00
Jonas Platte
84829e23dc
events: Remove shared Relation type in favor of more per-event-type ones 2021-06-20 19:27:12 +02:00
Jonas Platte
1c31d31be1
events: More consistent item ordering for room::encrypted 2021-06-20 18:38:06 +02:00
Jonas Platte
090948e04f
events: Consistently use relates_to for Relation field name 2021-06-20 01:32:29 +02:00
Devin Ragotzy
e05aad184e events: Make all pub structs non_exhaustive 2021-06-18 20:53:06 +02:00
Jonas Platte
ec4b719546
events: Refactor message relations
* Discard unknown relations
* Move new_content into Relation::Replacement
2021-06-17 19:43:23 +02:00
Jonas Platte
750fe3f1f6
events: Remove ruma-common reexports 2021-06-17 19:43:23 +02:00
Jonas Platte
e622803679
Use bool::then to simplify some code 2021-06-17 19:43:22 +02:00
Jonas Platte
0ad2e79b84
events: Use str::repeat instead of iter::repeat + collect 2021-06-06 16:34:10 +02:00
Marcel
a322c8cf08
Add support for spaces 2021-05-20 18:36:35 +02:00
Kévin Commaille
52d8ff1ffd
events: Improve room::message markdown constructors
Only return an html message if some markdown formatting was detected.
2021-05-18 21:28:15 +02:00
Jonas Platte
4dd9baa238
Improve consistency in docs 2021-05-16 23:38:19 +02:00
Jonas Platte
aba58909aa
events: Remove questionable trait implementation 2021-05-16 23:21:58 +02:00
Jonas Platte
ecf875358c
events: Fix issues from not testing previous commits 2021-05-16 22:53:00 +02:00
Jonas Platte
55df2aa26a
events: Make remaining types in room::* non-exhaustive 2021-05-16 22:45:48 +02:00
Jonas Platte
504c7ad06e
events: Remove non-exhaustive attribute from enum with hidden variant 2021-05-16 22:36:57 +02:00
Jonas Platte
01f20b17c0
events: Make remaining types in room::message non-exhaustive 2021-05-16 22:36:06 +02:00
Jonas Platte
7626135faf
events: Make fields of doc(hidden) struct private 2021-05-16 22:34:24 +02:00
Jonas Platte
61a033db58
Improve documentation 2021-05-16 22:07:00 +02:00
Jonas Platte
2ada8690f8
events: Make FileMessageEventContent non-exhaustive 2021-05-16 00:14:23 +02:00
Jonas Platte
f77b49d4b8
events: Make more types non-exhaustive in room::message 2021-05-15 22:20:48 +02:00