update last_seen_ip and last_seen_ts on updating device metadata
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
115ea03edf
commit
4eb7ad79d1
2 changed files with 15 additions and 16 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue