Commit Graph

3983 Commits

Author SHA1 Message Date
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
Jonas Platte
10fd4675bb ruma: Re-export state-res 2021-05-08 01:03:49 +02:00
Jonas Platte
74562f20bd ruma: Including client in full feature 2021-05-08 01:03:21 +02:00
Jonas Platte
9263d0c949 state-res: Switch from log to tracing 2021-05-08 01:02:42 +02:00
Jonas Platte
410b4aed25 state-res: Upgrade rand and update usage 2021-05-08 00:57:43 +02:00
Jonas Platte
f58462a002 state-res: Depend on ruma-* subcrates instead of ruma 2021-05-08 00:52:50 +02:00
Jonas Platte
ee39f7c28c events: Add missing dependency feature 2021-05-08 00:44:04 +02:00
Jonas Platte
addc67051e Integrate state-res and rename to ruma-state-res 2021-05-08 00:39:51 +02:00
Jonas Platte
6609829735 Add 'crates/ruma-state-res/' from commit '56bf45c0235701ac6df56993c327d2f97a499ef9'
git-subtree-dir: crates/ruma-state-res
git-subtree-mainline: 719433eb5c
git-subtree-split: 56bf45c023
2021-05-08 00:20:05 +02:00
Jonas Platte
56bf45c023 Fix default-allowed clippy lints 2021-05-08 00:03:08 +02:00
Jonas Platte
719433eb5c serde: Add PartialEq implementations for CanonicalJsonValue 2021-05-07 23:39:48 +02:00
Jonas Platte
6d5f198164 serde: Add is_* methods to CanonicalJsonValue 2021-05-07 23:24:16 +02:00
Jonas Platte
3b6a719b8e serde: Add as_array_mut and as_object_mut methods to CanonicalJsonValue 2021-05-07 23:20:49 +02:00
Kévin Commaille
24154195a0 events: Construct EncryptedEventContent from EncryptedEventScheme 2021-05-07 09:53:35 +00:00
Kévin Commaille
db76c22180 events: Add constructor for EncryptedEventContent 2021-05-07 11:34:10 +02:00
Jonas Platte
b96ab9580e events: Update stderr for ui test
The order in which errors are emitted changed.
2021-05-06 18:47:18 +02:00
Jonas Platte
95cd1ee60d Update readme 2021-05-06 18:44:58 +02:00
Kévin Commaille
6501e3dc30 events: Add TagName::User variant and display_name method 2021-05-06 16:00:21 +00:00
Jonas Platte
97c3b5cf47 client-api: Add link to spec for r0::uiaa 2021-05-06 17:22:16 +02:00
Jonas Platte
1bf84ab9fb Remove unused dev-dependencies 2021-05-06 14:45:13 +02:00
Jonas Platte
db327e7d9c ci: Clean up 2021-05-06 14:31:52 +02:00
Jonas Platte
729fb51d77 Remove allow(clippy::lint) attributes that are no longer necessary 2021-05-06 14:31:52 +02:00
Jonas Platte
1dc72de70e Remove allow(clippy::inconsistent_struct_constructor)
The lint was buggy, but that has now been fixed.
2021-05-06 14:31:52 +02:00
Jonas Platte
325c0adf69 Remove --quiet flags
They were useful on builds.sr.ht but for local running of CI commands
it's nice to have some progress indication.
2021-05-06 14:31:51 +02:00
Jonas Platte
997e0b302a Make nightly the default toolchain
… because it's required for some clippy lints.
2021-05-06 14:31:37 +02:00
Jonas Platte
b759955a52 events: Add missing Default implementation 2021-05-06 14:07:38 +02:00
Devin Ragotzy
5090c11843 Enable non-default clippy lints 2021-05-06 11:07:31 +00:00
Devin Ragotzy
c6aa2e0428 Fix clippy warnings across workspace 2021-05-06 06:16:28 -04:00
Jonas Platte
8310e10ca1 Fix formatting 2021-05-05 23:53:17 +02:00
Jonas Platte
cf291bd5ba Clean up lint attributes 2021-05-05 23:39:52 +02:00
Jonas Platte
6ea55459eb Move general Ruma room link to the others in CONTRIBUTING.md 2021-05-05 17:30:17 +02:00
Jonas Platte
3c4e0c50db Update .github/CODEOWNERS after repo restructure 2021-05-05 17:26:50 +02:00
Jonas Platte
07f4212094 serde: Fix new doctest 2021-05-05 16:29:17 +02:00
Jonas Platte
cc455057f7 serde: Add Raw::get_field 2021-05-05 11:22:01 +02:00
Kévin Commaille
448e29ce24 events: Add tag::TagName type 2021-05-03 17:33:12 +02:00
Jonas Platte
7cf9fab6af ci: Fix msrv check 2021-05-03 16:05:35 +02:00
Jonas Platte
3db0ea7026 Move all crates into a new crates directory 2021-05-03 15:50:27 +02:00
Jonas Platte
faa6faee9e Use sub-.gitignore for xtask 2021-05-03 14:58:50 +02:00
Jonas Platte
944e03f33a Update README.md 2021-05-03 14:54:51 +02:00
Jonas Platte
f5955cee9e xtask: Simplify code for ci task 2021-05-02 14:02:54 +02:00
Abhik Jain
d53f2ba71b identity-service-api: Add msisdn validation endpoints 2021-05-02 13:37:04 +02:00
gnieto
325f2f918c Properly deserialize well-known response
According to the spec
(https://matrix.org/docs/spec/server_server/r0.1.4#get-well-known-matrix-server),
the expected field to receive the delegated name is `m.server` instead
of `m.homeserver`.
2021-05-02 13:36:55 +02:00
Jonas Platte
f940ff5d11 client-api: Make a few more types non-exhaustive 2021-05-01 21:56:07 +02:00
Jonas Platte
3342deed55 client-api: Change str to UserId in ThirdPartySigned 2021-05-01 21:55:42 +02:00
Jonas Platte
196da5b01d client-api: Fix missing backticks in doc comment 2021-05-01 21:55:11 +02:00
Jonas Platte
92826df304 client: Add support for isahc as an HTTP client 2021-05-01 21:20:11 +02:00