Olivia Lee
8c9800735b
Bump ruma to 2ea8b833e3a80c1d650964a1f3e83ee569cf5c0b (RoomVersion -> RoomVersionRules)
...
<https://github.com/ruma/ruma/pull/2045 >
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2025-08-30 18:37:54 +02:00
Olivia Lee
b94cc429b7
Bump ruma to 1387667de806c37a6d7f72125117009bd618e32a
...
The significant change is 26edd40a704040e7104161da81c9bae91b7ddcaa,
which removes the global compat feature, so that each compat feature
must now be enabled individually. We're using the slightly later
1387667d because it has a bugfix that ruma needs to compile.
There are a few ruma compat features that were not previously part of
the global compat feature:
- compat-arbitrary-length-ids
- compat-upload-signature
- compat-encrypted-stickers
I have not enabled these here, to avoid a behavior change.
2025-08-09 00:31:35 +02:00
Olivia Lee
2648991092
fix lints revealed by tracing change
...
<https://github.com/tokio-rs/tracing/pull/3108 > changes #[instrument] so
that several lints that were previously hidden on instrumented functions
are now visible.
2025-08-06 12:27:45 -07:00
Charles Hall
595f35b673
fix lints for upcoming 1.88.0 toolchain
2025-08-06 12:27:45 -07:00
Lambda
d425ba72f8
Update ruma to 0.12.2
2025-05-04 14:03:46 -07:00
Lambda
175a62007d
Update MSRV to 1.84.0
...
And appease clippy (`__CARGO_FIX_YOLO=1 cargo clippy --fix` plus some
manual type shuffling).
2025-02-18 17:06:08 +00:00
Charles Hall
a4e1522875
generalize get_room_version
...
There are other fields of `m.room.create` events that are useful to
individually extract without caring about the values of other fields.
2024-11-08 18:38:16 -08:00
Charles Hall
c9c30fba30
upgrade to latest ruma
2024-11-08 17:26:44 -08:00
Lambda
6022d56094
Use enums for options to send_request(), add allow_loopback
2024-09-27 10:48:12 -07:00
Benjamin Lee
7672cc8473
use OwnedMxcUri in media service
...
Not using `MxcData` because it borrows it's fields, and so we wouldn't
be able to return an owned `MxcData` from functions that read the db.
2024-09-15 00:32:17 -07:00
Lambda
3bb4a25c1d
Include old verify keys in _matrix/key/v2/server response
2024-09-13 17:02:30 +00:00
Lambda
3a55684623
Update MSRV to 1.81.0
...
Plus a "__CARGO_FIX_YOLO=1 cargo clippy --fix"
2024-09-08 09:54:08 -07:00
Lambda
5c4062742f
Log curl command line for all requests at trace
2024-09-08 09:10:40 -07:00
Lambda
f1642c92d1
Take iterator in calculate_hash()
...
Avoids unnecessary allocations.
2024-09-06 17:20:14 +00:00
Lambda
26322d5a95
Add PduId wrapper struct
...
Death to Vec<u8>
2024-09-06 17:20:14 +00:00
Lambda
542e097cdf
server_server: use non-deprecated create_join_event types
...
Instead of working with v1 types and converting them to v2 as required,
do it the other way around. Allows us to remove a very broad
#[allow(deprecated)].
2024-09-05 19:42:37 +00:00
Lambda
84850a163d
Factor content out of FileMeta
...
That's not what *meta*data means
2024-09-01 09:42:45 +00:00
Lambda
d3b6718812
server_server: implement authenticated media endpoints
2024-09-01 09:42:45 +00:00
Lambda
edfaa83405
server_server: make outbound requests using spec v1.11
...
This is required for authenticated media requests, which are otherwise
performed using the unstable endpoint.
2024-09-01 09:42:45 +00:00
Lambda
5a5bea3217
cargo update ruma httparse
...
This adds authenticated media APIs.
2024-09-01 09:42:45 +00:00
Lambda
006ea0eb94
Fix appservice users getting invited over federation
...
Invites are magic sauce, we need to manually send it off to the
appservice if it's for an appservice user.
2024-08-31 10:18:29 +00:00
Lambda
dd24a44112
Use TokenSet for roomid_mutex_federation
2024-07-22 18:07:03 +00:00
Lambda
34ccb2cd06
Use TokenSet for roomid_mutex_state
2024-07-22 18:07:03 +00:00
Charles Hall
9d8e1a1490
fix api/server_server events
2024-07-16 11:12:07 -07:00
Charles Hall
cb036593ea
refactor send_request in api/server_server
...
Seriously, what is going on with the control flow in this codebase?
2024-06-24 12:43:28 -07:00
Charles Hall
e83a30af4b
reduce duplicate events
...
I hate `log_error`. A better way to do this would be to not reuse the
same error type literally everywhere, so you could distinguish, in
`crate::service::sending::Service::handle_response`, whether to emit an
event based on which function created the error. Fixing that is a lot
more work, though.
2024-06-24 12:40:59 -07:00
Charles Hall
12b0fb7f91
don't write KBs of html to the logs
...
Handing this to tracing as a String makes it automatically escape
newlines and such.
2024-06-24 12:40:57 -07:00
Matthias Ahouansou
da99b0706e
fix(edus): ensure sender server is the same as the user in the content
...
Original patch by Matthias. Benjamin modified the logic to include
logging when an event was rejected, for consistency with the existing
check on device key updates.
Co-authored-by: Benjamin Lee <benjamin@computer.surgery>
2024-06-12 10:36:41 -07:00
Charles Hall
0c2094a56f
record FoundIn with metrics instead of traces
...
This is much more efficient in terms of network use and data storage,
and also easier to visualize.
2024-06-06 20:56:36 -07:00
Charles Hall
22dd7f1a54
move FoundIn to observability.rs
2024-06-05 17:41:36 -07:00
Lambda
7dbae9ac2b
Fix tracing in send_request()
2024-06-04 13:32:32 -07:00
Lambda
f7a0e3012b
server_server: log ignored signing key updates
2024-06-04 13:32:32 -07:00
Lambda
88bb2ea600
Remove redundant span attributes
...
There's no need to record attributes that are already present in all
callers.
2024-06-04 13:32:31 -07:00
Lambda
f35cbfd89e
More tracing spans
2024-06-04 13:32:31 -07:00
Lambda
5c39c7c5ff
Use destination field in X-Matrix Authorization header
...
Both validating and sending it is a MUST since Matrix v1.3.
2024-06-03 20:50:49 +00:00
Lambda
62dd097f49
Use Ruma XMatrix type instead of rolling our own
...
Both the hand-rolled parser and serialization were wrong in countless
ways. The current Ruma parser is much better, and the Ruma serialization
will be fixed by https://github.com/ruma/ruma/pull/1830 .
2024-06-03 20:50:49 +00:00
Charles Hall
8f0fdfb2f2
upgrade all cargo dependencies
...
Unfortunately we need to pull tracing-opentelemetry from git because
there hasn't been a release including the dependency bump on the other
opentelemetry crates.
2024-05-26 19:47:00 -07:00
Charles Hall
eaeb7620d9
enable multiple_bound_locations lint
2024-05-26 19:47:00 -07:00
Lambda
67cb6f817d
Instrument caches
2024-05-22 20:10:42 +00:00
Charles Hall
f8961d5578
rename Ruma to Ar
...
This follows the pattern of the previous commit.
2024-05-19 19:04:20 -07:00
Charles Hall
7ea98dac72
rename RumaResponse to Ra
...
It's very commonly used so having a short name is worthwhile, I think.
2024-05-19 19:03:45 -07:00
Charles Hall
230ebd3884
don't automatically wrap in RumaResponse
...
This allows us to use the `ruma_route` convenience function even when we
need to add our own hacks into the responses, thus making us less
reliant on Ruma.
2024-05-18 18:31:36 -07:00
Charles Hall
87ac0e2a38
don't log that federation is disabled
...
This mostly just spams the logs with useless information when doing
cursed local testing.
2024-05-16 22:33:37 -07:00
Charles Hall
93a2bf9c93
change FedDest::{into -> to}_*
...
They don't need to take ownership of `self`.
2024-05-16 22:15:06 -07:00
Charles Hall
0afc1d2f50
change rustfmt configuration
...
This change is fully automated, except the `rustfmt.toml` changes and
a few clippy directives to allow specific functions with too many lines
because they are longer now.
2024-05-16 19:11:40 -07:00
Charles Hall
1911ad34d9
stop putting comments and code on the same line
2024-05-16 15:22:35 -07:00
Charles Hall
40f9aa6f60
remove stale comments
...
Should've been removed in 98f1480e2b .
2024-05-15 23:45:54 -07:00
Charles Hall
509b70bd82
use the version function for s2s API too
...
This way the extra version information can appear there as well. Mainly
useful for showing off :P
2024-05-14 20:21:51 -07:00
Charles Hall
baab928281
enable too_many_lines lint
...
And just disable it everywhere it fires, I know.
2024-05-14 20:01:24 -07:00
Charles Hall
75358340bb
enable single_match_else lint
...
Also collapses some if statements in the federation name resolution code
2024-05-14 20:01:24 -07:00