78 Commits

Author SHA1 Message Date
Jonas Platte
702b619417
events: Introduce Redact trait 2021-05-15 13:26:05 +02:00
Jonas Platte
c07c3fa6d5
events: Introduce RedactContent trait 2021-05-15 13:23:20 +02:00
Jonas Platte
18005244c9
events: Merge RedactedSyncUnsigned and RedactedUnsigned 2021-05-15 13:12:13 +02:00
Jonas Platte
824a6db048
events-macros: Fix another missing type qualification 2021-05-15 12:27:25 +02:00
Jonas Platte
7403bdf1c8
events: Add redact method to Any[Sync]RoomEvent 2021-05-15 02:33:15 +02:00
Jonas Platte
2914c0b6a0
events: Add AnySyncRoomEvent::into_full_event 2021-05-15 02:27:03 +02:00
Jonas Platte
6db34b8ae4
events: Add accessor methods to AnyRoomEvent, AnySyncRoomEvent 2021-05-15 02:25:35 +02:00
Devin Ragotzy
d1f5fb1d87
events: Declare all event enums inside one macro invocation 2021-05-14 23:52:34 +00:00
Jonas Platte
a4811663de
events-macros: Fix missing type qualification 2021-05-15 00:58:18 +02:00
Jonas Platte
073b699660
api-macros: Fix tiny formatting inconsistency 2021-05-14 23:12:56 +02:00
Jonas Platte
b4aa66d68f
client: Fix broken intra-doc links 2021-05-14 14:36:29 +02:00
Jonas Platte
c2957df174
client: Fix borken doc(cfg) attribute 2021-05-14 14:35:05 +02:00
Jonathan de Jong
b616ba8233
Add reasons for each doctest ignore 2021-05-14 13:44:49 +02:00
Devin Ragotzy
058d2bfa24 Add kind = ToDevice for all to device content 2021-05-14 12:25:30 +02:00
Devin Ragotzy
b6558c64a0 Add global and room account content traits and to device trait 2021-05-14 12:25:30 +02:00
Devin Ragotzy
8252a1a32c Move all content declarations to content trait attribute 2021-05-14 12:25:30 +02:00
Devin Ragotzy
c7c1251f3f Specify content traits in attribute, remove derives 2021-05-14 12:25:30 +02:00
Jonas Platte
6c167fca38
state-res: Get rid of static mut 2021-05-14 01:40:23 +02:00
Jonas Platte
fe68bf0e07
Clean up json! formatting 2021-05-14 01:13:42 +02:00
Jonas Platte
5710d2740c
Replace uses of SystemTime with new UInt-based timestamp types 2021-05-14 01:13:17 +02:00
Jonas Platte
c34d570fff
common: Introduce SecondsSinceUnixEpoch, MilliSecondsSinceUnixEpoch 2021-05-13 01:06:04 +02:00
Damir Jelić
3bdead1cf2 client-api: Allow the DeviceId to turn into a DeviceIdOrAllDevices 2021-05-12 17:07:47 +02:00
Damir Jelić
d971b668ec events: Add the to-device variant of the m.key.verification.done event 2021-05-12 17:07:47 +02:00
Damir Jelić
166ee8b9d7 events: Add the to-device variant of the m.key.verification.ready event 2021-05-12 17:07:47 +02:00
Kévin Commaille
cb489729b8 events: Update IgnoredUserListEvent test 2021-05-12 16:02:44 +02:00
Kévin Commaille
7fd350d6c6 events: Restore docs for DummyEvent and RoomKeyEvent 2021-05-12 16:02:44 +02:00
Kévin Commaille
0acb121ee5 events: Remove BasicEventContent trait and derive 2021-05-12 16:02:44 +02:00
Kévin Commaille
7faa59be6b events: Remove BasicToDevice enum 2021-05-12 16:02:44 +02:00
Kévin Commaille
8d8ca81e04 events: Split Basic enum into GlobalAccountData, RoomAccountData and BasicToDevice enums
Closes #563
2021-05-12 16:02:44 +02:00
Devin Ragotzy
dcff455c19
ci: Enforce sorted dependencies with cargo-sort 2021-05-11 19:59:44 +00:00
Kévin Commaille
dd940f810e common: Use ruma-serde derives for ReceiptType 2021-05-11 10:11:02 +02:00
Kévin Commaille
32e80987e1 serde: Add PartialOrdAsRefStr, OrdAsRefStr and PartialEqAsRefStr derives 2021-05-11 10:11:02 +02:00
Kévin Commaille
6a2c028cfb events: Change receipt::Receipts struct to a BTreeMap<ReceiptType, UserReceipts> 2021-05-11 10:11:02 +02:00
Jonathan de Jong
91a7325bc4
Remove various Box<> wrappers 2021-05-10 17:15:11 +02:00
Jonas Platte
d71fa97346
Use slices for outgoing raw bodies 2021-05-10 15:16:37 +02:00
Kévin Commaille
d16fbe6fe6
events: Fix event deserialization benchmark
Regression introduced in e8d81da49281717ad46f36b76c40fc3853d2aafd
2021-05-10 13:02:22 +02:00
Jonas Platte
698087337b
events: Pass RoomVersionId by reference in redact method 2021-05-10 11:29:28 +02:00
Jonas Platte
c648f83cb6
events: Improve variable names in macro code 2021-05-10 11:23:45 +02:00
Adam
8adc9a0eb6
events: Add helpers to construct the fallback for rich replies 2021-05-10 10:06:40 +02:00
Jonas Platte
aca64eccea
events: Remove AnyEvent enum 2021-05-09 21:06:25 +02:00
Jonas Platte
7adc141aa0
appservice-api: Replace use of AnyEvent in push_events with AnyRoomEvent 2021-05-09 21:04:13 +02:00
Jonas Platte
e9218f182a
events: Remove AnyEvent from enum tests 2021-05-09 20:51:40 +02:00
Jonas Platte
e8d81da492
events: Remove AnyEvent deserialization benchmark 2021-05-09 20:41:07 +02:00
Jonas Platte
08e87ac3bf
api: Remove redundant clone 2021-05-09 00:02:44 +02:00
Kévin Commaille
bbb0b36536
events: Move FullyReadEvent from EphemeralRoomEvent to BasicEvent 2021-05-08 22:19:54 +02:00
gnieto
b610a725e8
Make try_into_http_response more safe
Remove `expect`s and `unwrap`s from `try_into_http_response`.
2021-05-08 20:22:06 +02:00
gnieto
e2eb92b8ed
Prevent panic on requests with invalid URIs
When `try_into_http_request` was used with an invalid base URI the code
was panicking. Acording to `http::request::Builder` documentation,
`headers_mut` returns `None` if the builder contains errors, which was
the case when an invalid URI was provided.

The new version only sets the additional headers in case that there are
no errors on the builder, preventing the panic. The conversion will
return an error when the builder is consumed on `body`.
2021-05-08 18:12:56 +02:00
Jonas Platte
a0f7e1b771
api: Replace error::Void by error::MatrixError 2021-05-08 14:33:12 +02:00
Jonas Platte
c01e8340eb
serde: Add From implementations for CanonicalJsonValue 2021-05-08 14:03:01 +02:00
Jonas Platte
71686ce8a4
state-res: Re-export RoomVersion from crate root 2021-05-08 01:34:27 +02:00