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
Charles Hall
db4951c5fd
enable semicolon_if_nothing_returned lint
2024-05-14 20:01:24 -07:00
Charles Hall
96e1877639
enable redundant_closure_for_method_calls lint
2024-05-14 20:01:24 -07:00
Charles Hall
2b8b5ccb1a
enable match_same_arms lint
2024-05-14 20:01:24 -07:00
Charles Hall
9606f59141
enable manual_let_else lint
2024-05-14 20:01:23 -07:00
Charles Hall
5c9967f89c
enable inconsistent_struct_constructor lint
2024-05-14 19:59:43 -07:00
Charles Hall
ebae8ceeb0
enable implicit_clone lint
2024-05-14 19:59:43 -07:00
Charles Hall
da440934bd
enable doc_markdown lint
2024-05-14 16:34:10 -07:00
Charles Hall
844b32f097
enable string_slice lint
...
Also swaps out vendored HTML-escaping code for a dependency that I
imagine has decent testing considering all of its reverse depedencies.
2024-05-12 19:08:12 -07:00
Charles Hall
d144db8688
enable ref_patterns lint
2024-05-12 18:51:27 -07:00
Charles Hall
71c48f66c4
enable as_conversions lint
...
There were some very, uh, creative (and inconsistent) ways to convert
between numeric types in here...
2024-05-12 18:51:26 -07:00
Charles Hall
bc2f7c6826
enable enum_variant_names lint
2024-05-12 18:51:26 -07:00
Charles Hall
d748544f0e
enable unreachable_pub lint
...
This causes some other lints to start firing too (which is good), but
I'm going to fix them in follow-up commits to keep things organized.
2024-05-12 18:51:26 -07:00
Charles Hall
360e020b64
rename conduit to grapevine
2024-04-30 21:54:56 -07:00
Matthias Ahouansou
475a68cbb9
refactor: disable federation at the router level
2024-04-13 10:39:32 +01:00
Timo Kösters
6c3ce71304
Merge branch 'dont-expect-reqwest-http-request' into 'next'
...
fix: do not expect that all http requests are valid reqwest requests
Closes #396
See merge request famedly/conduit!611
2024-04-05 09:53:14 +00:00
Matthias Ahouansou
e38af9b7fc
feat: use _matrix-fed._tcp SRV record, fallback to _matrix._tcp
2024-04-01 20:55:13 +01:00
Matthias Ahouansou
3ce3d13378
fix: do not expect that all http requests are valid reqwest requests
2024-03-31 22:20:36 +01:00
Timo Kösters
d2817679e5
refactor: remove previous typing implementation and add sync wakeup for new one
2024-03-22 08:24:17 +01:00
Timo Kösters
6bd7ff4917
improvement: do not save typing edus in db
2024-03-22 07:48:44 +01:00
Matthias Ahouansou
5f0bea6961
refactor: check if federation is disabled inside the authcheck where possible
2024-03-18 09:24:37 +00:00