mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
perf: Don't increment the device list version when updating local info
This commit is contained in:
@@ -7,7 +7,7 @@ use std::{
|
||||
|
||||
use axum::extract::State;
|
||||
use conduwuit::{
|
||||
Err, Error, Result, at, err, error, extract_variant, is_equal_to,
|
||||
Err, Error, Result, at, error, extract_variant, is_equal_to,
|
||||
matrix::{Event, TypeStateKey, pdu::PduCount},
|
||||
trace,
|
||||
utils::{
|
||||
@@ -72,11 +72,11 @@ pub(crate) async fn sync_events_v5_route(
|
||||
.users
|
||||
.get_device_metadata(sender_user, sender_device)
|
||||
.await
|
||||
.or_else(|_| err!(Request(NotFound("device {sender_device} not found?"))))?;
|
||||
.expect("Device metadata should exist for authenticated device");
|
||||
device.last_seen_ts = Some(MilliSecondsSinceUnixEpoch::now());
|
||||
services
|
||||
.users
|
||||
.update_device_metadata(sender_user, sender_device, &device)
|
||||
.update_device_last_seen(sender_user, sender_device, &device)
|
||||
.await?;
|
||||
|
||||
let mut body = body.body;
|
||||
|
||||
Reference in New Issue
Block a user