chore: Remove redundant client IP extractions on individual routes

This commit is contained in:
timedout authored and Ellis Git committed 2026-07-17 12:57:48 +00:00
1 parent 1e47090f5d
commit 789589ef37
26 files changed
+71 -205

No files matched your search

+1 -1
View File
@@ -181,7 +181,7 @@ type PresenceUpdates = HashMap<OwnedUserId, PresenceEventContent>;
)]
pub(crate) async fn sync_events_route(
State(services): State<crate::State>,
ClientIp(client_ip): ClientIp,
ClientIp(client_ip): ClientIp, // NOTE: Required for updating device metadata
body: Ruma<sync_events::v3::Request>,
) -> Result<sync_events::v3::Response> {
let sender_user = body.identity.expect_sender_user()?;
+1 -1
View File
@@ -67,7 +67,7 @@ type KnownRooms = BTreeMap<String, BTreeMap<OwnedRoomId, u64>>;
/// [MSC4186]: https://github.com/matrix-org/matrix-spec-proposals/pull/4186
pub(crate) async fn sync_events_v5_route(
State(ref services): State<crate::State>,
ClientIp(client_ip): ClientIp,
ClientIp(client_ip): ClientIp, // NOTE: Required for updating device metadata
body: Ruma<sync_events::v5::Request>,
) -> Result<sync_events::v5::Response> {
let sender_user = body.identity.expect_sender_user()?;