Commit Graph

35 Commits

Author SHA1 Message Date
Quentin Gliech 74bd3fe941 Allow the homeserver to perform introspection using a shared secret 2025-07-22 11:27:56 +02:00
Quentin Gliech 4c5b7d05b4 Avoid a few unnecessary clones when talking to Synapse 2025-07-21 13:14:38 +02:00
Quentin Gliech fbcfa25cba Remove the spurious password field from the request body 2025-07-21 13:08:36 +02:00
Quentin Gliech 5a32f00901 Rename create_device -> upsert_device 2025-07-21 10:54:40 +02:00
Quentin Gliech c649603830 Use the new dedicated Synapse API 2025-07-18 16:39:24 +02:00
Quentin Gliech 8af1b7a3fa Take the localpart instead of the MXID in HomeserverConnection methods 2025-07-18 16:39:24 +02:00
Quentin Gliech 59f133ccb8 Report AS-exclusive localparts as used, not an error 2025-06-25 14:12:41 +02:00
Quentin Gliech 3d96dc9d47 Update license headers to match the actual license 2025-06-12 10:32:16 +02:00
Quentin Gliech 29fb7d2a1b Fix encoding of MXIDs when creating devices in Synapse 2025-05-09 09:07:18 +02:00
Quentin Gliech 8bfe2d2092 Allow setting custom names on sessions (#4459) 2025-04-30 15:32:25 +02:00
Quentin Gliech d7791db643 Allow Synapse user deactivation to take up to 5 minutes 2025-04-28 19:40:17 +02:00
Quentin Gliech ecade0aa9d Don't check for availability of usernames that aren't ASCII 2025-04-28 17:29:54 +02:00
Quentin Gliech 8735bdb7f0 matrix: allow setting a custom device display name 2025-04-25 12:55:06 +02:00
Olivier 'reivilibre 9b8a824c4a change filter condition so that Some(false) does not signify dehydrated 2025-03-19 12:29:53 +00:00
Hubert Chathi 20e2e244b9 don't delete devices marked as dehydrated devices 2025-03-18 15:41:50 -04:00
Quentin Gliech f484896f16 Remove generic error type & always use an Arc on the HS connection
This should help us write other implementations of HomeserverConnection
2025-03-03 15:43:13 +01:00
Quentin Gliech 3d2b67a0b2 Upgrade to Rust 1.85 and edition 2024 2025-02-21 16:15:02 +01:00
Quentin Gliech 14948c35cb Replace all the manual HTTP clients with reqwest 2024-10-28 13:46:38 +01:00
Quentin Gliech ed4b6c42a7 Remove (C) 2024-09-10 14:28:55 +02:00
Quentin Gliech f6bb100c0a License headers change 2024-09-05 13:25:42 +02:00
Quentin Gliech fa32387ca5 Show whether the user is deactivated on the homeserver in the GraphQL API
Fix #2375
2024-07-16 13:20:28 +02:00
Quentin Gliech 0207495225 Add a way to reactivate users on the homeserver 2024-07-16 13:20:28 +02:00
Quentin Gliech bf276289b6 Fully sync the devices with the homeserver 2024-07-16 09:32:07 +02:00
reivilibre 49e8fe57f4 Improve errors when MAS contacts the Synapse homeserver (#2794)
* Add some drive-by docstrings

* Change text rendering of catch_http_codes::HttpError

Using `#[source]` is unnatural here because it makes it look like
two distinct errors (one being a cause of the other),
when in reality it is just one error, with 2 parts.

Using `Display` formatting for that leads to a more natural error.

* Add constraints to `catch_http_code{,s}` methods

Not strictly required, but does two things:

- documents what kind of function is expected
- provides a small extra amount of type enforcement at the call site,
  rather than later on when you find the result doesn't implement Service

* Add a `catch_http_errors` shorthand

Nothing major, just a quality of life improvement so you don't have to
repetitively write out what a HTTP error is

* Unexpected error page: remove leading whitespace from preformatted 'details' section

The extra whitespace was probably unintentional and makes the error harder to read,
particularly when it wraps onto a new line unnecessarily

* Capture and log Matrix errors received from Synapse

* Drive-by clippy fix: use clamp instead of min().max()

* Convert `err(Display)` to `err(Debug)` for `anyhow::Error`s in matrix-synapse support module
2024-06-07 11:14:04 +00:00
Quentin Gliech 3978acd94e Fix recently added Clippy lints
This also ignores the clippy::blocks_in_conditions lint in two crates,
until tracing gets fixed: https://github.com/tokio-rs/tracing/issues/2876
2024-05-07 07:32:02 +02:00
Quentin Gliech 24021cc984 matrix-synapse: urlencode parameters before sending them to Synapse 2024-05-03 16:56:56 +02:00
Quentin Gliech 4aeb446061 Make the HomeserverConnection available in handlers 2024-02-29 11:21:24 +01:00
Quentin Gliech 20dd5ca311 Add API to check localpart availability 2024-02-29 11:21:24 +01:00
Quentin Gliech 5957112ff6 Interface to allow cross-signing reset using Synapse admin API 2023-12-05 17:47:36 +01:00
Quentin Gliech a0f5f3c642 Enable clippy lints on a workspace level
This enables a lot more lints than before in some crates, so this fixed a lot of warnings as well.
2023-12-05 17:20:42 +01:00
Quentin Gliech 8984cc703b Add instance privacy policy, TOS and imprint, and loads of design cleanups 2023-10-30 15:55:15 +01:00
Quentin Gliech 54071c4969 Make the HTTP client factory reuse the underlying client
This avoids duplicating clients, and makes it so that they all share the same connection pool.
2023-09-14 16:52:01 +02:00
Quentin Gliech 1e474518f5 graphql: API to set the user displayname (#1412) 2023-08-03 14:45:59 +00:00
Quentin Gliech 8142cad3d6 Call the homeserver for user deactivation 2023-08-03 14:06:34 +02:00
Quentin Gliech 4181cbc9d5 Refactor the matrix connection logic
Also make the display name available through the graphql api
2023-06-16 19:52:39 +02:00