Commit graph

35 commits

Author SHA1 Message Date
Lambda
d425ba72f8
Update ruma to 0.12.2 2025-05-04 14:03:46 -07:00
Benjamin Lee
9add9a1e96
fix room version comparisons
Fixes a set of bugs introduced by 00b77144c1,
where we replaced explicit `RoomVersionId` matches with `version < V11`
comparisons. The `Ord` impl on `RoomVersionId` does not work like that,
and is in fact a lexicographic string comparison[1]. The most visible
effect of these bugs is that incoming redaction events would sometimes
be ignored.

Instead of reverting to the explicit matches, which were quite verbose,
I implemented a `RoomVersion` struct that has flags for each property
that we care about. This is similar to the approach used by ruma[2] and
synapse[3].

[1]: 7cfa3be0c6/crates/ruma-common/src/identifiers/room_version_id.rs (L136)
[2]: 7cfa3be0c6/crates/ruma-state-res/src/room_version.rs
[3]: c856ae4724/synapse/api/room_versions.py
2024-09-26 13:01:25 -07:00
tranquillity-codes
c70cfd3d25
Return 504 when a file is missing to be by-spec
The spec defines that the media endpoints should return 504 when a file
is not-yet-uploaded, which has been interpreted to include when a file
was deleted. Modifies the /media/v3/download/ and /media/r0/thumbnail
endpoints.
2024-07-21 20:42:07 -07:00
Charles Hall
7392880bf8
fix utils/error events 2024-07-16 11:12:08 -07:00
Charles Hall
573fac553c
promote request error event from info to warn
And also make it structured.
2024-06-24 12:40:59 -07: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
5048af3a8f
enable doc_markdown lint 2024-05-26 19:47:00 -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
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
2b8b5ccb1a
enable match_same_arms lint 2024-05-14 20:01:24 -07:00
Charles Hall
c51e87ec9a
enable items_after_statements lint 2024-05-14 19:59:43 -07:00
Charles Hall
cb2cd6e253
enable enum_glob_use lint 2024-05-14 16:36:45 -07:00
Charles Hall
6bdaeab1af
enable multiple_inherent_impl lint 2024-05-12 18:51:27 -07:00
Charles Hall
5fd156a6bb
enable error_impl_error lint
Except the 1 violation would have to be renamed in, like, every single
file in this project. So we're just enabling it so that we don't make
the same mistake in the future.
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
0f7b6d482c
remove conduit_bin feature 2024-04-30 21:54:55 -07:00
Charles Hall
c765a1634d
remove unused database backends 2024-04-30 21:54:39 -07:00
Val Lorentz
b5e21f761b Merge branch 'next' into 'room-v11'
# Conflicts:
#   src/service/rooms/timeline/mod.rs
#   src/utils/error.rs
2024-04-11 17:34:42 +00:00
Matthias Ahouansou
11612e347d
fix: return error when trying to unregister unknown appservice id 2024-03-31 21:24:15 +01:00
Matthias Ahouansou
fa930182ae
fix(appservices): don't panic on empty registration url
perf(appservices): cache regex for namespaces
2024-03-10 13:27:48 +00:00
strawberry
a2ac491c54 bump ruma, add wrong room keys error code, tiny logging change
can't update ruma to very latest commit because of the weird JsOption thing for syncv4 that i can't wrap my head around how to use, not important anyways

Signed-off-by: strawberry <strawberry@pupbrain.dev>
2024-02-16 20:45:27 +00:00
Val Lorentz
5a7bb1e8f1 Return error instead of panic when first event is not m.room.create 2023-12-02 17:51:19 +01:00
Val Lorentz
520806d413 Use Ruma's redact_content_in_place instead of custom implementation 2023-12-01 19:12:23 +01:00
Timo Kösters
d2bfcb018e Merge branch 'error-leak-fix' into 'next'
sanitise potentially sensitive errors

See merge request famedly/conduit!523
2023-08-01 11:25:06 +00:00
Timo Kösters
acfe381dd3
fix: threads get updated properly
Workaround for element web while waiting for https://github.com/matrix-org/matrix-js-sdk/pull/3635
2023-07-31 16:18:23 +02:00
girlbossceo
83805c66e5 sanitise potentially sensitive errors
prevents errors like DB or I/O errors from leaking filesystem paths

Co-authored-by: infamous <ehuff007@gmail.com>
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-07-30 17:30:16 +00:00
Nyaaori
c86313d4fa
chore: code cleanup
https://rust-lang.github.io/rust-clippy/master/index.html#op_ref

https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string

https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
2022-12-21 10:42:12 +01:00
Timo Kösters
f1d2574651
finish upgrade ruma 2022-12-17 09:28:08 +01:00
Jonas Platte
d39ce1401d
WIP: Upgrade Ruma 2022-12-16 11:57:32 +01:00
Timo Kösters
2b70d9604a
fix: element gets stuck in /initialSync 2022-10-11 23:07:03 +02:00
Timo Kösters
076e9810ba
cargo fix 2022-10-10 14:02:04 +02:00
Timo Kösters
6b131202b9
Bump ruma 2022-10-10 14:02:04 +02:00
Timo Kösters
025b64befc
refactor: renames and split room.rs 2022-08-15 16:30:34 +02:00
Renamed from src/error.rs (Browse further)