mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 13:16:56 +00:00
update last_seen_ip and last_seen_ts on updating device metadata
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
1 parent
115ea03edf
commit
4eb7ad79d1
2 files changed
+15
-16
No files matched your search
@@ -791,17 +791,6 @@ impl Service {
|
||||
}
|
||||
|
||||
pub async fn update_device_metadata(&self, user_id: &UserId, device_id: &DeviceId, device: &Device) -> Result<()> {
|
||||
// Only existing devices should be able to call this, but we shouldn't assert
|
||||
// either...
|
||||
let key = (user_id, device_id);
|
||||
if self.db.userdeviceid_metadata.qry(&key).await.is_err() {
|
||||
return Err!(Database(error!(
|
||||
?user_id,
|
||||
?device_id,
|
||||
"Called update_device_metadata for a non-existent user and/or device"
|
||||
)));
|
||||
}
|
||||
|
||||
increment(&self.db.userid_devicelistversion, user_id.as_bytes());
|
||||
|
||||
let mut userdeviceid = user_id.as_bytes().to_vec();
|
||||
|
||||
Reference in new issue
Block a user